Re: [PATCH v3] branch: add flags and config to inherit tracking
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 18, 2021, 21:44 UTC
- Message-ID
- <xmqqk0iauhwu.fsf@gitster.g>
- In-Reply-To
- <87a6j6tbsv.fsf@gmgdl.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 8 quoted lines
> On Sat, Oct 16 2021, Josh Steadmon wrote: > >> It can be helpful when creating a new branch to use the existing >> tracking configuration from the branch point. However, there is >> currently not a method to automatically do so. > > There's no method to get *only* that config, but this use-case is why > the "-c" option (copy branch) was added.
Hmph, I doubt the claim about the original motivation behind "-c", but it sure sounds like an interesting point of view. The commit at the tip, as well as configurations are copied, which is most of the way there, but I suspect that the --track=inherit is mostly to be used in the context of "git checkout -b" and the mention of "branch" is merely for simplicity of the description of this topic, no? And you cannot say "git checkout --clone-branch original" (yet).
But it is a very interesting way to twist the point of view.