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

Re: `git fetch` not updating 'origin/HEAD' after branch rename

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 14, 2021, 21:12 UTC
Message-ID
<xmqqim4oy3hi.fsf@gitster.g>
In-Reply-To
<87pmyxjcnz.fsf@igel.home>
Andreas Schwab <schwab@linux-m68k.org> writes:
Show 7 quoted lines
> On Apr 14 2021, Ævar Arnfjörð Bjarmason wrote:
>
>> Nothing in git itself actually needs this remote HEAD past clone time,
>> and with 4f37d457065 (clone: respect remote unborn HEAD, 2021-02-05)
>> there'll be even less reason to pay attention to it.
>
> Isn't that what git rev-parse origin resolves to?
Correct.

And that is why refs/remotes/origin/HEAD is defined to point at the branch that the owner of LOCAL repository considers is of interest, which may not be the same as what the owner of the REMOTE repository thinks is the primary branch in their worldview.

Previous: Andreas SchwabNext: Jeff King
Message 9 of 10 in “`git fetch` not updating 'origin/HEAD' after branch rename”
  1. Sam BostockApr 13, 2021
  2. Junio C HamanoApr 13, 2021
  3. Andreas SchwabApr 13, 2021
  4. Junio C HamanoApr 13, 2021
  5. Chris TorekApr 14, 2021
  6. Jeff KingApr 14, 2021
  7. Ævar Arnfjörð BjarmasonApr 14, 2021
  8. Andreas SchwabApr 14, 2021
  9. Junio C HamanoApr 14, 2021
  10. Jeff KingApr 15, 2021

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.