Re: [PATCH v2 1/2] rebase: remove completely useless -C option
- From
Elijah Newren <newren@gmail.com>
- Date
- Jan 20, 2023, 15:31 UTC
- Message-ID
- <CABPp-BFakaEqnpW4Xn1rzcOC6oVmcEz+OxBV4dKA_TJZ-xbTvg@mail.gmail.com>
- In-Reply-To
- <xmqq5yd1za0t.fsf@gitster.g>
On Fri, Jan 20, 2023 at 4:05 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 22 quoted lines
>
> "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > From: Elijah Newren <newren@gmail.com>
> >
> > The `-C` option to rebase was introduced with 67dad687ad ("add -C[NUM]
> > to git-am", 2007-02-08).
> > ...
> > As per the git-apply documentation for the `-C` option:
> > Ensure at least <n> lines of surrounding context match...When fewer
> > lines of surrounding context exist they all must match.
> >
> > The fact that format-patch was not passed a -U option to increase the
> > number of context lines meant that there would still only be 3 lines of
> > context to match on.
>
> I am afraid that this is only less than half true. Isn't the
> intended use of -C<num> similar to how "patch --fuzz" is used?
>
> That is, even when a patch does not cleanly apply with full context
> in the incoming diff, by requiring *smaller* number of lines to
> match, the diff *could* be forced to apply with reduced precision?Oh! Reducing the number of lines of context to pay attention to never even occurred to me for whatever reason. I'll drop the patch.