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

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.

Previous: jyotish kumarNext: Harald Nordgren
Message 2 of 7 in “[RFC] pull: custom fetch refspecs and fork-point lookup”
  1. jyotish kumarOct 13, 2026
  2. Junio C HamanoOct 14, 2026
  3. Harald NordgrenOct 15, 2026
  4. jyotish kumarOct 15, 2026
  5. Junio C HamanoOct 15, 2026
  6. jyotish kumarOct 16, 2026
  7. Junio C HamanoOct 16, 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.