GNU bug report logs - #27953
vc-region-history doesn't follow renames

Previous Next

Package: emacs;

Reported by: Clément Pit--Claudel <clement.pitclaudel <at> live.com>

Date: Fri, 4 Aug 2017 15:13:02 UTC

Severity: normal

Done: Clément Pit--Claudel <clement.pitclaudel <at> live.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Clément Pit--Claudel <clement.pitclaudel <at> live.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#27953: closed (vc-region-history doesn't follow renames)
Date: Sat, 05 Aug 2017 17:28:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 5 Aug 2017 19:27:21 +0200
with message-id <852633bf-6cb1-3efd-824b-c93e5307b034 <at> live.com>
and subject line Re: bug#27953: vc-region-history doesn't follow renames
has caused the debbugs.gnu.org bug report #27953,
regarding vc-region-history doesn't follow renames
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
27953: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=27953
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Clément Pit--Claudel <clement.pitclaudel <at> live.com>
To: bug-gnu-emacs <at> gnu.org
Subject: vc-region-history doesn't follow renames
Date: Fri, 4 Aug 2017 17:12:39 +0200
[Message part 3 (text/plain, inline)]
X-Debbugs-CC: monnier <at> iro.umontreal.ca

Hi bug-gnu-emacs,

vc-git-region-history currently stops at the first rename, instead of continuing across renames.  This is because it doesn't pass --follow to git.  The original author put the required option "--follow" in a comment, adding "FIXME: not supported?".

Indeed, `git log -p --follow -L5,25:file.c' doesn't work.  But `git log -p --follow -L5,25:file.c file.c' does work (note the extra mention of the file name).

Any arguments against the attached patch?

(CCing Stefan, since you're the last one who modified this function)

Clément.

[0001-Follow-renames-in-vc-git-region-history.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, attachment)]
[Message part 6 (message/rfc822, inline)]
From: Clément Pit--Claudel <clement.pitclaudel <at> live.com>
To: Kyle Meyer <kyle <at> kyleam.com>
Cc: Andreas Schwab <schwab <at> linux-m68k.org>,
 Stefan Monnier <monnier <at> IRO.UMontreal.CA>, 27953-done <at> debbugs.gnu.org
Subject: Re: bug#27953: vc-region-history doesn't follow renames
Date: Sat, 5 Aug 2017 19:27:21 +0200
[Message part 7 (text/plain, inline)]
On 2017-08-05 19:05, Kyle Meyer wrote:
> Clément Pit--Claudel <clement.pitclaudel <at> live.com> writes:
>> On 2017-08-04 19:21, Stefan Monnier wrote:
>>>> Indeed, `git log -p --follow -L5,25:file.c' doesn't work.  But `git
>>>> log -p --follow -L5,25:file.c file.c' does work (note the extra mention of
>>>> the file name).
>>>
>>> Hmm... what's the difference between
>>>
>>>     git log -p -L5,25:file.c
>>> and
>>>     git log -p -L5,25:file.c file.c
>>
>> The second one allows --follow; the first one doesn't.  I don't know what differences they may be beyond that :/
> 
> As Andreas mentioned, even though git doesn't throw an error, giving a
> pathspec with -L is documented as invalid.

Thanks. I'm glad I sent the patch for review.

> But you shouldn't need to add --follow here.  Renames should be followed
> by default when -L is used.  (At least, that's what I see using Git
> v2.13.3.)

This seems to be new. Adding --follow appears to make git follow renames here (2.7.4).

Thanks.
Clément.

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 7 years and 349 days ago.

Previous Next


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