GNU bug report logs - #26345
25.1; vc-annotate in Git is unable to fully navigate the history if the file was moved

Previous Next

Package: emacs;

Reported by: Wojciech Siewierski <wojciech.siewierski <at> gmail.com>

Date: Mon, 3 Apr 2017 00:06:02 UTC

Severity: normal

Found in version 25.1

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Full log


Message #33 received at 26345 <at> debbugs.gnu.org (full text, mbox):

From: Sean Whitton <spwhitton <at> spwhitton.name>
To: Jakub Ječmínek <kuba <at> kubajecminek.cz>
Cc: dgutov <at> yandex.ru, 26345 <at> debbugs.gnu.org,
 Elizabeth Ferdman <gnudevliz <at> gmail.com>, wojciech.siewierski <at> gmail.com
Subject: Re: bug#26345: [PATCH] Handle renamed files when cycling through
 revisions
Date: Sat, 05 Jul 2025 17:42:04 +0100
Hello,

On Mon 30 Jun 2025 at 10:29pm +02, Jakub Ječmínek via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote:

> * lisp/vc/vc-git.el (vc-git-registered,vc-git-annotate-command):
> Update the FILE argument passed to 'vc-git-annotate-command'
> based on whether FILE exists in the current revision. If it
> doesn't, look up its new name. (Bug#26345)
> ---
> What do you think about the patch below?

Thanks for posting this.

We can't add an optional argument to vc-git-registered directly because
that's the vc-git implementation for the `registered' backend function,
so its lambda list is fixed by the API.  You could get around this by
making vc-git-registered a tiny wrapper around a function
vc-git--registered which has all the existing code plus the optional
argument.

But is the call to vc-git-registered needed at all?  Why not just look
at the file name changes list immediately, and if the file does not
appear there, assume that the original file name is valid?

And maybe then this could happen up in vc-annotate instead of being
Git-specific.  It's kind of a heuristic anyway.

-- 
Sean Whitton




This bug report was last modified 9 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.