Re: [PATCH v11] checkout: extend --track with a "fetch" mode to refresh start-point
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 19, 2026, 10:34 UTC
- Message-ID
- <xmqq1pf77kml.fsf@gitster.g>
- In-Reply-To
- <pull.2281.v11.git.git.1779177508772.gitgitgadget@gmail.com>
"Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 7 quoted lines
> checkout: --track=fetch > > * Find the right remote by checking which remote's fetch refspec maps > to the user's start-point, instead of assuming the start-point begins > with the remote's name. This fixes cases where the user has a custom > refspec mapping into a namespace whose name differs from the remote > (e.g. fetching from origin into refs/remotes/upstream/*).
This comment is even before looking at the patch text. After getting one issue pointed out, I'd expect you to think about related issues before sending a new round out.
One. Have you considered the case where the remote-tracking refs are overlapping, e.g., where "origin" and "upstream" point at different URLs but they both store in "refs/remotes/upstream/*"? Perhaps their URLs may textually be different but are pointing logically at the same place (e.g., one ssh:// the other https:// for example).
What should happen? What does happen after you apply this patch?
> * For a bare namespace name, follow <namespace>/HEAD first to figure > out which branch to fetch.
What should happen if HEAD does not exist? What does happen after you apply this patch?
Thanks.