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

Re: [PATCH] remote: add --set-head option to 'git remote add'

From
Harald Nordgren <haraldnordgren@gmail.com>
Date
Apr 26, 2026, 08:21 UTC
Message-ID
<20260426082106.11266-1-haraldnordgren@gmail.com>
In-Reply-To
<20260425220629.GA28590@coredump.intra.peff.net>
Show 10 quoted lines
> It already does, doesn't it? Doing:
> 
>   $ git init
>   $ git remote add --fetch origin /path/to/some/repo
>   $ git for-each-ref
> 
> shows an origin/HEAD link.
> 
> Which I think is not too surprising, as it is just calling "git fetch"
> under the hood.
I think you are right! So maybe all of this new code is not needed at all.
Harald
Previous: Jeff King
Message 6 of 6 in “remote: add --set-head option to 'git remote add'”
  1. remote: add --set-head option to 'git remote add'Harald Nordgren via GitGitGadget, Apr 25, 2026
  2. Ben KnobleApr 25, 2026
  3. ghHarald Nordgren, Apr 25, 2026
  4. Junio C HamanoApr 25, 2026
  5. Jeff KingApr 25, 2026
  6. Harald NordgrenApr 26, 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.