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

Re: [PATCH] branch: let inherit track a remote-tracking start point

From
Harald Nordgren <haraldnordgren@gmail.com>
Date
Oct 17, 2026, 09:54 UTC
Message-ID
<CAHwyqnVwnMi+DzQDvS6mgUzg-CWACUviVkYv-UiYJT+Yq83QLg@mail.gmail.com>
In-Reply-To
<xmqqcxt9h9g6.fsf@gitster.g>
On Fri, Oct 16, 2026 at 6:55 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 9 quoted lines
>
> "Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
> >  `inherit`;; if the starting point has a tracking configuration, it is copied to the new
> > -     branch
> > +     branch. A remote-tracking starting point is tracked directly, as with `true`.
>
> That is "A remote-tracking branch given as a starting point", not "A
> remote-tracking starting point".  Don't abbreviate and drop "branch".
Thanks!
> I am not sure if it is the users of `inherit` want that forking a
> new branch from something that they know is *not* tracking anything
> suddenly starts to track the starting point (whether it is a
> remote-tracking branch or something else).
For me it's simple, only tracking when the starting point is a remote branch.
Show 18 quoted lines
> Looking at the originating commit d3115660b4 (branch: add flags and
> config to inherit tracking, 2021-12-20), it only talks about what
> they want to do when the starting point does track something, and
> forgets to say what they want when it does not track anything (the
> author CC'ed in case he retains the memory of the motivation from 5
> years ago), but if you ask me _now_, not doing anything, i.e., the
> behaviour the old commit happened to have implemented without
> explanation does sound like the right thing to do.
>
> What we should do if this change of behaviour turns out to be
> undesirable?
>
> Perhaps `inherit` should gain a synonym `inherit-or-ignore` for
> those who prefer the current behaviour, and we want two extra
> behaviours, `inherit-or-fail` that complains and dies if the
> specified starting point does not have anything for the new branch
> to inherit, and `inherit-or-direct` that uses the fallback
> definition, or something?

Seems quite overkill for the relatively small problem this is solving. But it would be interesting to hear the original author's POV.

Harald
Previous: Junio C HamanoNext: Ben Knoble
Message 3 of 8 in “branch: let inherit track a remote-tracking start point”
  1. branch: let inherit track a remote-tracking start pointHarald Nordgren via GitGitGadget, Oct 16, 2026
  2. Junio C HamanoOct 16, 2026
  3. Harald NordgrenOct 17, 2026
  4. Ben KnobleOct 19, 2026
  5. Junio C HamanoOct 19, 2026
  6. Phillip WoodOct 18, 2026
  7. Harald NordgrenOct 18, 2026
  8. Ben KnobleOct 19, 2026

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.