emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Renaming files with git not all that bad?


From: tomas
Subject: Re: Renaming files with git not all that bad?
Date: Thu, 9 Dec 2021 10:00:25 +0100

On Thu, Dec 09, 2021 at 09:43:54AM +0100, Andreas Schwab wrote:
> On Dez 09 2021, Phil Sainty wrote:

[...]

> Git doesn't care.  The rename detection is always performed on the two
> end points of a diff operation, irrespective of the intervening history.

That said, rename detection is based on heuristics and shaped by one or
more configuration knobs. So it is wise to either understand that
heuristics [1] well or to keep rename commits somewhat "isolated"
(personally, I tend to not make (biggish) changes in the file(s) I'm
renaming in the same commit. YMMV, heuristically, of course.

I also have acquired the custom to use "git mv" and friends, be it to
remind myself that I'm doing it under VC (and to keep that peripheral
eye to whether VC is doing what I think it does).

Cheers

[1] some similarity measure plus some threshold. There are also rumours
   of massive renames hitting some limits.

-- 
tomás

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]