Re: [PATCH 1/2] am: pay attention to user-defined context size
- From
Elijah Newren <newren@gmail.com>
- Date
- Dec 21, 2019, 05:37 UTC
- Message-ID
- <CABPp-BEReoD+YUZuniNqkDabYqdKrFvzPeNbWpRPexXUuX0XiQ@mail.gmail.com>
- In-Reply-To
- <xmqq1rsy8w3c.fsf@gitster-ct.c.googlers.com>
On Fri, Dec 20, 2019 at 2:34 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 11 quoted lines
> > Elijah Newren <newren@gmail.com> writes: > > > diff.context should NOT affect plumbing. So if it's not plumbing by > > that test, and it's not *UI* as per what you say, what exactly is it? > > I actually was saying that diff.context is UI thing, and should make > no effect on how "am" interprets its input. > > Which the codepath in "am" are you trying to affect? "am" is mainly > a consumer of "diff" output, and not a producer, so ...
Okay, I can't seem to find a simple way to reproduce separate from the
testcase reported here:
https://lore.kernel.org/git/CAN_72e2h2avv-U9BVBYqXVKiC+5kHy-pjejyMSD3X22uRXE39g@mail.gmail.com/To summarize, when I run these exact steps: git clone --quiet https://github.com/proski/git-rebase-demo cd git-rebase-demo git checkout --quiet branch1 git -c diff.context=5 rebase --quiet origin/branch2 test $? -eq 0 && echo Successfully rebased
echo Difference from expected: git diff --shortstat origin/merge-good
The rebase succeeds in both cases, but I get different output from the shortstat depending on whether or not this git_am_config patch is applied.
I can't seem to track down why this patch makes a difference when as you say it shouldn't, nor can I seem to generate an am-only testcase. I feel like it should be easy to get at least one of these given the short steps to reproduce (the repo only has 1 file and three relevant commits), but it seems to be stumping me nonetheless.