diff mbox series

[07/10] merge-strategies.txt: explain why no-renames might be useful

Message ID 7eecf879d608d8be17d4aa0ae087fb610156019c.1628004920.git.gitgitgadget@gmail.com (mailing list archive)
State Superseded
Headers show
Series Documentation updates: merge-strategies | expand

Commit Message

Elijah Newren Aug. 3, 2021, 3:35 p.m. UTC
From: Elijah Newren <newren@gmail.com>

Signed-off-by: Elijah Newren <newren@gmail.com>
---
 Documentation/merge-strategies.txt | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Junio C Hamano Aug. 4, 2021, 12:28 a.m. UTC | #1
"Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Elijah Newren <newren@gmail.com>
>
> Signed-off-by: Elijah Newren <newren@gmail.com>
> ---
>  Documentation/merge-strategies.txt | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt
> index eb43befac7b..d21dbd1e051 100644
> --- a/Documentation/merge-strategies.txt
> +++ b/Documentation/merge-strategies.txt
> @@ -75,9 +75,10 @@ no-renormalize;;
>  	`merge.renormalize` configuration variable.
>  
>  no-renames;;
> -	Turn off rename detection. This overrides the `merge.renames`
> -	configuration variable.
> -	See also linkgit:git-diff[1] `--no-renames`.
> +	Turn off rename detection, which can be computationally
> +	expensive.  This overrides the `merge.renames`
> +	configuration variable.  See also linkgit:git-diff[1]
> +	`--no-renames`.

Other reasons are that we may find a pair that the user did not
intend to when they made the change (i.e. it was done purely a
creation and a deletion but we found similarity), or we may find a
wrong original to consolidate changes from a side branch into, and
these are fundamental as it is our early design choice not to
record renames at the time of committing.
Elijah Newren Aug. 4, 2021, 12:44 a.m. UTC | #2
On Tue, Aug 3, 2021 at 6:28 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > From: Elijah Newren <newren@gmail.com>
> >
> > Signed-off-by: Elijah Newren <newren@gmail.com>
> > ---
> >  Documentation/merge-strategies.txt | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt
> > index eb43befac7b..d21dbd1e051 100644
> > --- a/Documentation/merge-strategies.txt
> > +++ b/Documentation/merge-strategies.txt
> > @@ -75,9 +75,10 @@ no-renormalize;;
> >       `merge.renormalize` configuration variable.
> >
> >  no-renames;;
> > -     Turn off rename detection. This overrides the `merge.renames`
> > -     configuration variable.
> > -     See also linkgit:git-diff[1] `--no-renames`.
> > +     Turn off rename detection, which can be computationally
> > +     expensive.  This overrides the `merge.renames`
> > +     configuration variable.  See also linkgit:git-diff[1]
> > +     `--no-renames`.
>
> Other reasons are that we may find a pair that the user did not
> intend to when they made the change (i.e. it was done purely a
> creation and a deletion but we found similarity), or we may find a
> wrong original to consolidate changes from a side branch into, and
> these are fundamental as it is our early design choice not to
> record renames at the time of committing.

Good points.  Trying to describe all of that makes it somewhat
lengthy; does it make sense to include all of that, or should I just
drop this patch?
Junio C Hamano Aug. 4, 2021, 2:05 a.m. UTC | #3
Elijah Newren <newren@gmail.com> writes:

>> >  no-renames;;
>> > -     Turn off rename detection. This overrides the `merge.renames`
>> > -     configuration variable.
>> > -     See also linkgit:git-diff[1] `--no-renames`.
>> > +     Turn off rename detection, which can be computationally
>> > +     expensive.  This overrides the `merge.renames`
>> > +     configuration variable.  See also linkgit:git-diff[1]
>> > +     `--no-renames`.
>>
>> Other reasons are that we may find a pair that the user did not
>> intend to when they made the change (i.e. it was done purely a
>> creation and a deletion but we found similarity), or we may find a
>> wrong original to consolidate changes from a side branch into, and
>> these are fundamental as it is our early design choice not to
>> record renames at the time of committing.
>
> Good points.  Trying to describe all of that makes it somewhat
> lengthy; does it make sense to include all of that, or should I just
> drop this patch?

What do the git-diff page say?  If it is not worth saying there,
perhaps we should not have to do so here, either.

We should have _somewhere_ that lists these pitfalls that the users
may want to be aware of, that is common to all the features that
ends up using and relying on the rename machinery.  I do not think
merge strategies documentation is the place.
diff mbox series

Patch

diff --git a/Documentation/merge-strategies.txt b/Documentation/merge-strategies.txt
index eb43befac7b..d21dbd1e051 100644
--- a/Documentation/merge-strategies.txt
+++ b/Documentation/merge-strategies.txt
@@ -75,9 +75,10 @@  no-renormalize;;
 	`merge.renormalize` configuration variable.
 
 no-renames;;
-	Turn off rename detection. This overrides the `merge.renames`
-	configuration variable.
-	See also linkgit:git-diff[1] `--no-renames`.
+	Turn off rename detection, which can be computationally
+	expensive.  This overrides the `merge.renames`
+	configuration variable.  See also linkgit:git-diff[1]
+	`--no-renames`.
 
 find-renames[=<n>];;
 	Turn on rename detection, optionally setting the similarity