Re: [RFC] pull: custom fetch refspecs and fork-point lookup
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 14, 2026, 19:07 UTC
- Message-ID
- <xmqq5wz4rthd.fsf@gitster.g>
- In-Reply-To
- <CAGjZMyTQt2XEF69pJWHA=diRjoidixGs48E1vA0ytGUgZYOZNQ@mail.gmail.com>
jyotish kumar <jyotishkumar725015@gmail.com> writes:
Show 8 quoted lines
> While reading `builtin/pull.c`, I came across a FIXME in > `get_tracking_branch()` concerning the assumption that remote branches > follow the default mapping from `refs/heads/<branch>` to > `refs/remotes/<remote>/<branch>`. > ... > Does this analysis sound correct? I would appreciate feedback on > whether this is a real issue and whether resolving the configured > fetch mapping would be the right direction to address it.
The reason the "FIXME" you noticed exists is that the assumption the code makes is broken. Assuming that refs/remotes/<remote>/<branch> tracks <branch> from <remote> would break when a customized fetch refspec is used.
I vaguely recall mentioning a similar "map between a remote-tracking branch and a branch at the remote" issue while discussing a recent work by Harald to narrow a "git fetch" that does not specify what to fetch, but I cannot find a mailing list archive reference, sorry.