* bug#39044: 27.0.50; On git log-view-diff does not work for moved files.
@ 2020-01-08 20:48 David Koppelman
2020-05-13 1:36 ` Dmitry Gutov
0 siblings, 1 reply; 4+ messages in thread
From: David Koppelman @ 2020-01-08 20:48 UTC (permalink / raw)
To: 39044
With (setq vc-git-print-log-follow t) visit a file in a git repo that
was moved from some other directory and which had changes when in that
other directory. Start log view, C-x v =, move the cursor to a commit
made in the file's former location, and press d (log-view-diff). Rather
than showing a diff, a message reporting no changes is shown.
This flaw was noted in bug 8756, covering vc-diff/log-view, but was
left to a follow on bug.
(https://debbugs.gnu.org/cgi/bugreport.cgi?bug=8756).
Interestingly, vc-annotate has no trouble with renames. See
commit d1e4c4037e88f3256db19813805d03f8ad0291fa.
In GNU Emacs 27.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
of 2019-12-20 built on cyc.ece.lsu.edu
Repository revision: 85a60da92d4db5c87ecfa152501d246425550fc3
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Scientific Linux 7.7 (Nitrogen)
Configured using:
'configure CFLAGS=-O3 --without-pop'
Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS JSON PDUMPER LCMS2
GMP
Important settings:
value of $LC_COLLATE: C
value of $LC_TIME: C
value of $LANG: en_US.utf8
locale-coding-system: utf-8-unix
Major mode: log
Minor modes in effect:
shell-dirtrack-mode: t
global-hi-lock-mode: t
hi-lock-mode: t
which-function-mode: t
flyspell-mode: t
tooltip-mode: t
global-eldoc-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Features:
(shadow emacsbug smerge-mode diff whitespace bug-reference vc-annotate
log-view pcvs-util vc vc-dispatcher vc-git diff-mode mhtml-mode css-mode
smie eww mm-url url-queue js cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs sgml-mode p-viewer misearch
multi-isearch bbdb-gui flow-fill gnus-uu yenc mailalias smtpmail
sendmail nnir shr-color color sort gnus-cite smiley mm-archive
gnus-async gnus-bcklg qp cl-extra gnus-ml disp-table gnus-topic utf-7
gnutls network-stream nsm imap rfc2104 nndoc nndraft nnmh nnmbox
bbdb-gnus bbdb-snarf mail-extr bbdb-com gnus-agent gnus-srvr gnus-score
score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime
smime dig nntp gnus-cache gnus-sum url url-proxy url-privacy url-expand
url-methods url-history mailcap shr url-cookie url-domsuf url-util svg
xml dom gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail
mail-source utf7 netrc nnoo parse-time iso8601 gnus-spec gnus-int
gnus-range gnus-win gnus nnheader wid-edit add-log help-mode mule-util
cal-move p-iimage easy-mmode simtools p-tex-funcs shell pcomplete comint
ring man ansi-color hi-lock p-stop-time time-stamp dired-aux p-page
dabbrev ps-print ps-print-loaddefs ps-def lpr holidays hol-loaddefs appt
p-diary-aux cal-x p-diary-audit diary-lib diary-loaddefs cal-menu
calendar cal-loaddefs paren mic-paren message rmc puny dired
dired-loaddefs format-spec rfc822 mml mml-sec epa epg epg-config
gnus-util rmail rmail-loaddefs text-property-search time-date mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader ffap
thingatpt ccl-mode ampl-mode bbdb-autoloads bbdb timezone texize
chemora-mode which-func imenu flyspell ispell gnuplot-mode edmacro
kmacro p-autoreload derived sd image-file advice package easymenu
browse-url url-handlers url-parse auth-source cl-seq eieio eieio-core
cl-macs eieio-loaddefs password-cache json subr-x map url-vars seq
byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win
x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite charscript charprop case-table epa-hook
jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)
Memory information:
((conses 16 321268 49388)
(symbols 48 28911 1)
(strings 32 92367 7980)
(string-bytes 1 3634829)
(vectors 16 47078)
(vector-slots 8 1360945 151650)
(floats 8 775 1958)
(intervals 56 11966 7520)
(buffers 1000 79)
(heap 1024 59319 13646))
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#39044: 27.0.50; On git log-view-diff does not work for moved files.
2020-01-08 20:48 bug#39044: 27.0.50; On git log-view-diff does not work for moved files David Koppelman
@ 2020-05-13 1:36 ` Dmitry Gutov
2023-12-14 1:23 ` Dmitry Gutov
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Gutov @ 2020-05-13 1:36 UTC (permalink / raw)
To: David Koppelman, 39044
On 08.01.2020 22:48, David Koppelman wrote:
>
> With (setq vc-git-print-log-follow t) visit a file in a git repo that
> was moved from some other directory and which had changes when in that
> other directory. Start log view, C-x v =, move the cursor to a commit
> made in the file's former location, and press d (log-view-diff). Rather
> than showing a diff, a message reporting no changes is shown.
I usually give up and press 'D' in those cases (diff for the whole tree).
> This flaw was noted in bug 8756, covering vc-diff/log-view, but was
> left to a follow on bug.
> (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=8756).
>
> Interestingly, vc-annotate has no trouble with renames. See
> commit d1e4c4037e88f3256db19813805d03f8ad0291fa.
vc-annotate is fine because 'git blame' includes the previous file name
in the output. Not so for 'git log' by default.
Looking at this issue for some time, I haven't found an easier way to do
this rather than:
1. When vc-git-print-log-follow=t, also add the --name-status argument
to the command invocation.
2. Hide this new text from the user using font lock by adding some rules
to vc-git-log-view-mode.
3. _Probably_ teach log-view-current-file how to determine the current
file name. _Maybe_ via log-view-file-re. Some come would also need to
set log-view-per-file-logs to t for per-file Git logs. It could also be
made into a backend method instead.
See also bug#13004 for the same problem when using Hg. It could use the
same approach, but the solution is more questionable since '--stat'
seems to noticeably slow it down.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#39044: 27.0.50; On git log-view-diff does not work for moved files.
2020-05-13 1:36 ` Dmitry Gutov
@ 2023-12-14 1:23 ` Dmitry Gutov
2023-12-15 20:48 ` Dmitry Gutov
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Gutov @ 2023-12-14 1:23 UTC (permalink / raw)
To: David Koppelman, 39044
On 13/05/2020 04:36, Dmitry Gutov wrote:
> On 08.01.2020 22:48, David Koppelman wrote:
>>
>> With (setq vc-git-print-log-follow t) visit a file in a git repo that
>> was moved from some other directory and which had changes when in that
>> other directory. Start log view, C-x v =, move the cursor to a commit
>> made in the file's former location, and press d (log-view-diff). Rather
>> than showing a diff, a message reporting no changes is shown.
>
> I usually give up and press 'D' in those cases (diff for the whole tree).
>
>> This flaw was noted in bug 8756, covering vc-diff/log-view, but was
>> left to a follow on bug.
>> (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=8756).
>>
>> Interestingly, vc-annotate has no trouble with renames. See
>> commit d1e4c4037e88f3256db19813805d03f8ad0291fa.
>
> vc-annotate is fine because 'git blame' includes the previous file name
> in the output. Not so for 'git log' by default.
>
> Looking at this issue for some time, I haven't found an easier way to do
> this rather than:
>
> 1. When vc-git-print-log-follow=t, also add the --name-status argument
> to the command invocation.
>
> 2. Hide this new text from the user using font lock by adding some rules
> to vc-git-log-view-mode.
>
> 3. _Probably_ teach log-view-current-file how to determine the current
> file name. _Maybe_ via log-view-file-re. Some come would also need to
> set log-view-per-file-logs to t for per-file Git logs. It could also be
> made into a backend method instead.
>
> See also bug#13004 for the same problem when using Hg. It could use the
> same approach, but the solution is more questionable since '--stat'
> seems to noticeably slow it down.
I have now posted a somewhat related solution to
https://debbugs.gnu.org/55871#41.
Except it requires vc-git-print-log-follow to be disabled, and has
virtually no runtime overhead. And it works when a fileset contains
several files, not just for singles (a rare case, though).
Feedback welcome.
And maybe these bug reports should be merged, actually, since the
complaint is more or less the same.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#39044: 27.0.50; On git log-view-diff does not work for moved files.
2023-12-14 1:23 ` Dmitry Gutov
@ 2023-12-15 20:48 ` Dmitry Gutov
0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Gutov @ 2023-12-15 20:48 UTC (permalink / raw)
To: David Koppelman, 39044-done
Version: 30.1
On 14/12/2023 03:23, Dmitry Gutov wrote:
> On 13/05/2020 04:36, Dmitry Gutov wrote:
>> On 08.01.2020 22:48, David Koppelman wrote:
>>>
>>> With (setq vc-git-print-log-follow t) visit a file in a git repo that
>>> was moved from some other directory and which had changes when in that
>>> other directory. Start log view, C-x v =, move the cursor to a commit
>>> made in the file's former location, and press d (log-view-diff). Rather
>>> than showing a diff, a message reporting no changes is shown.
>>
>> I usually give up and press 'D' in those cases (diff for the whole tree).
>>
>>> This flaw was noted in bug 8756, covering vc-diff/log-view, but was
>>> left to a follow on bug.
>>> (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=8756).
>>>
>>> Interestingly, vc-annotate has no trouble with renames. See
>>> commit d1e4c4037e88f3256db19813805d03f8ad0291fa.
>>
>> vc-annotate is fine because 'git blame' includes the previous file
>> name in the output. Not so for 'git log' by default.
>>
>> Looking at this issue for some time, I haven't found an easier way to
>> do this rather than:
>>
>> 1. When vc-git-print-log-follow=t, also add the --name-status argument
>> to the command invocation.
>>
>> 2. Hide this new text from the user using font lock by adding some
>> rules to vc-git-log-view-mode.
>>
>> 3. _Probably_ teach log-view-current-file how to determine the current
>> file name. _Maybe_ via log-view-file-re. Some come would also need to
>> set log-view-per-file-logs to t for per-file Git logs. It could also
>> be made into a backend method instead.
>>
>> See also bug#13004 for the same problem when using Hg. It could use
>> the same approach, but the solution is more questionable since
>> '--stat' seems to noticeably slow it down.
>
> I have now posted a somewhat related solution to
> https://debbugs.gnu.org/55871#41.
>
> Except it requires vc-git-print-log-follow to be disabled, and has
> virtually no runtime overhead. And it works when a fileset contains
> several files, not just for singles (a rare case, though).
>
> Feedback welcome.
>
> And maybe these bug reports should be merged, actually, since the
> complaint is more or less the same.
Feedback is still welcome, but I have now pushed a revised version to
master (5b80894d0a7), so marking this as resolved.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-12-15 20:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-08 20:48 bug#39044: 27.0.50; On git log-view-diff does not work for moved files David Koppelman
2020-05-13 1:36 ` Dmitry Gutov
2023-12-14 1:23 ` Dmitry Gutov
2023-12-15 20:48 ` Dmitry Gutov
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).