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 20, 2019, 19:38 UTC
Message-ID
<CABPp-BFYyF5RbZVuwo8LtDZZQ9KQ2od4FQqQYaeSqNCNKcZXPw@mail.gmail.com>
In-Reply-To
<xmqqwoaq94ql.fsf@gitster-ct.c.googlers.com>
On Fri, Dec 20, 2019 at 11:28 AM Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
>
> "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> > From: Elijah Newren <newren@gmail.com>
> >
> > am previously only checked gpg-related config options and the default
> > config options while ignoring any diff-related options.  This meant that
> > when users tried to set diff.context to something larger than the
> > default value of 3, it was ignored.  Pay attention to the diff settings
> > too.
>
> Can the benefit brought in by this change demonstrated by a new test
> or two?

Yeah, I'll try to come up with something. I was originally going to test 'git -c diff.context=5 rebase', but of course that depends on Denton's change too to work.

> Puzzled.  "am" accepts whatever patch somebody else prepared and
> has no control over how the incoming "diff" was produced by that
> somebody else.

I was too, but the diff.context change didn't work until I fixed both format-patch and am to pay attention to diff.context.

> Besides, I do not think it should be affected by any diff_*UI*_config()
> in the first place.

Does that mean that diff.context is checked in the wrong place in diff.c, and should be moved from git_diff_ui_config() to git_diff_basic_config()? (And perhaps the same is true for diff.algorithm?)

Previous: Junio C HamanoNext: Elijah Newren
Message 4 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.