On 13/12/2022 03:23, Dmitry Gutov wrote: >> I read your message, and I think immitating GitHub's UI is a great >> idea, as it liberates us from having to do any kind of "pretreatment" >> of the git log (which can be expensive for large repos). > > Indeed. I suppose we'll lose out in some more complex cases (e.g. if > --follow tracks copies, it might track the cases when several files had > been copied into one, including when that action spanned several > commits; and thus --follow could show the history of each such file), > but we should win in the most common cases (single-file copies and > renames) OOtB, which we don't have any good support for still. > >> We should focus in this direction to fix this issue. If I get some >> spare time over the holidays I will try to take a look (sadly, I >> cannot promise that will be the case...). > > We won't be able to put the improvement into Emacs 29 anyway (the > release branch has been cut, it's now bugfix-only), so there is no hurry. > > Let's see who gets to this first. If you wanted to finish up your patch > instead, I'm not going to say no either. But GitHub's approach seems > like it should require less (and less complex) code. Attached is the implementation for this alternative approach. It's Git-only, but otherwise seems to function well (with potential for future additions). The look of the message and the button could use some work, but this is the best I came up thus far. As far as testing, it allowed following all files in Emacs's repo (that I have tried) to their original creation. Including etc/NEWS.29, and most other NEWS.*, with NEWS.28 being an exception (apparently because on that occasion NEWS was truncated before NEWS.28 was created). Also important: set vc-git-print-log-follow to nil. Otherwise logs don't end on renames, and this feature doesn't get a chance to work. Cheers, Dmitry.