From: Junio C Hamano <gitster@pobox.com>
To: "Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Harald Nordgren <haraldnordgren@gmail.com>,
Josh Steadmon <steadmon@google.com>
Subject: Re: [PATCH] branch: let inherit track a remote-tracking start point
Date: Fri, 16 Oct 2026 09:55:05 -0700 [thread overview]
Message-ID: <xmqqcxt9h9g6.fsf@gitster.g> (raw)
In-Reply-To: <pull.2450.git.git.1792134165785.gitgitgadget@gmail.com> (Harald Nordgren via GitGitGadget's message of "Fri, 16 Oct 2026 07:02:45 +0000")
"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".
If a starting point is not a remote-tracking branch, shouldn't the
same thing happen, by the way? IOW, shouldn't the updated text and
behaviour be more like
`inherit`;; if the starting point has a tracking
configuration, it is copied to the new branch. Otherwise,
the new branch is set to track the starting point itself.
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).
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?
prev parent reply other threads:[~2026-10-16 16:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 7:02 [PATCH] branch: let inherit track a remote-tracking start point Harald Nordgren via GitGitGadget
2026-10-16 16:55 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqcxt9h9g6.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=haraldnordgren@gmail.com \
--cc=steadmon@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.