Re: [PATCH 1/3] patch-ids: turn off rename detection
- From
Jacob Keller <jacob.keller@gmail.com>
- Date
- Sep 7, 2016, 22:12 UTC
- Message-ID
- <CA+P7+xriHk=UrBhLD1mWK7mWBth_2du7jgLPSAkoSAjKz0de-Q@mail.gmail.com>
- In-Reply-To
- <20160907220232.uotocvgdojfcl4o4@sigill.intra.peff.net>
On Wed, Sep 7, 2016 at 3:02 PM, Jeff King <peff@peff.net> wrote:
Show 16 quoted lines
> The patch-id code may be running inside another porcelain > like "git log" or "git format-patch", and therefore may have > set diff_detect_rename_default, either via the diff-ui > config, or by default since 5404c11 (diff: activate > diff.renames by default, 2016-02-25). This is the case even > if a command is run with `--no-renames`, as that is applied > only to the diff-options used by the command itself. > > Rename detection doesn't help the patch-id results. It > _may_ actually hurt, as minor differences in the files that > would be overlooked by patch-id's canonicalization might > result in different renames (though I'd doubt that it ever > comes up in practice). > > But mostly it is just a waste of CPU to compute these > renames.
Yes this seems reasonable.
Show 9 quoted lines
> > Note that this does have one user-visible impact: the > prerequisite patches listed by "format-patch --base". There > may be some confusion between different versions of git as > older ones will enable renames, but newer ones will not. > However, this was already a problem, as people with > different settings for the "diff.renames" config would get > different results. After this patch, everyone should get the > same results, regardless of their config.
Makes sense.
Show 6 quoted lines
> > Signed-off-by: Jeff King <peff@peff.net> > --- > The patch is the same as v1, but the commit message is modified, as I > realized that "--base" does expose this value publicly (but as I argue > above, this is probably an improvement).
I agree this is an improvement.
Thanks, Jake