git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Junio C HamanoNext: Elijah Newren via GitGitGadget
Message 7 of 10 in “Rebase am fixes”
  1. 0/2 Rebase am fixesElijah Newren via GitGitGadget, Dec 20, 2019
  2. 1/2 am: pay attention to user-defined context sizeElijah Newren via GitGitGadget, Dec 20, 2019
  3. Junio C HamanoDec 20, 2019
  4. Elijah NewrenDec 20, 2019
  5. Elijah NewrenDec 20, 2019
  6. Junio C HamanoDec 20, 2019
  7. Elijah NewrenDec 21, 2019
  8. 2/2 rebase: fix saving of --signoff state for am-based rebasesElijah Newren via GitGitGadget, Dec 20, 2019
  9. Junio C HamanoDec 20, 2019
  10. Johannes SchindelinJan 1, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.