--- Begin Message ---
Subject: |
vc-region-history doesn't follow renames |
Date: |
Fri, 4 Aug 2017 17:12:39 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
X-Debbugs-CC: address@hidden
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
Description: Text Data
signature.asc
Description: OpenPGP digital signature
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#27953: vc-region-history doesn't follow renames |
Date: |
Sat, 5 Aug 2017 19:27:21 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 2017-08-05 19:05, Kyle Meyer wrote:
> Clément Pit--Claudel <address@hidden> 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
Description: OpenPGP digital signature
--- End Message ---