Re: [PATCH v2 1/2] rebase: remove completely useless -C option
- From
Elijah Newren <newren@gmail.com>
- Date
- Jan 20, 2023, 15:32 UTC
- Message-ID
- <CABPp-BHjcD=sa5ACorrzSmcGNrksQ-Jr0Z2MVptOJjWcN=h4Rw@mail.gmail.com>
- In-Reply-To
- <CAN0heSo8cqNqhx9+AJZJS2rwJxBG_HZjhgxQZf8nw5t82NDXBg@mail.gmail.com>
On Fri, Jan 20, 2023 at 1:55 AM Martin Ågren <martin.agren@gmail.com> wrote:
Show 21 quoted lines
> > On Fri, 20 Jan 2023 at 06:27, Elijah Newren via GitGitGadget > <gitgitgadget@gmail.com> wrote: > > > > 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. So, anyone attempting to use this option in > > git-rebase would just be spinning their wheels and wasting time. I was > > one such user a number of years ago. > > I suppose someone might have something like GIT_DIFF_OPTS="--unified=20" > meaning they would actually have more context for their `-C` to act on. > So I guess there is a chance that someone somewhere has actually been > able to make use of `git rebase -C` after all? I'm not really arguing > either way -- just noting the possibility, as remote as it may be. > > Martin
Ah, good point. And combined with Junio's point that -C is apparently about reducing rather than increasing context, I should just drop the patch.