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

Re: [RFC/PATCH] Add fetch.updateHead option

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Nov 21, 2020, 01:18 UTC
Message-ID
<CAMP44s0E+e11jGFDa1zLK5Tv+2Zuv-_wXNF0NysoqEjtMgv0Pw@mail.gmail.com>
In-Reply-To
<20201121004033.GD353076@coredump.intra.peff.net>
On Fri, Nov 20, 2020 at 6:40 PM Jeff King <peff@peff.net> wrote:
> I don't think we do advertise the symref in such a case. In v2, the
> symref information is attached to individual lines in the ref
> advertisement. And we don't advertise the unborn line (we could, but I
> think we might need a special syntax for the oid field).
This may be worth considering changing.

If a hosting provider (e.g. GitHub) decides to configure an initial branch (e.g. main) it would be nice for "git clone" to have information about that initial branch so the user doesn't have to change it manually to please the provider's aesthetics.

So the instructions could be:
  git clone $url .
  echo "# myproject" >> README.md
  git add README.md
  git commit -m "first commit"
  # git branch -M main # this step would not be necessary
  git push -u origin HEAD
Personally I don't care about this. But others might find it useful.
Cheers.
-- 
Felipe Contreras
Previous: Jeff KingNext: Jeff King
Message 9 of 13 in “Add fetch.updateHead option”
  1. Add fetch.updateHead optionFelipe Contreras, Nov 18, 2020
  2. Ævar Arnfjörð BjarmasonNov 18, 2020
  3. Felipe ContrerasNov 18, 2020
  4. Junio C HamanoNov 18, 2020
  5. Felipe ContrerasNov 18, 2020
  6. Jeff KingNov 20, 2020
  7. Junio C HamanoNov 21, 2020
  8. Jeff KingNov 21, 2020
  9. Felipe ContrerasNov 21, 2020
  10. Jeff KingNov 24, 2020
  11. Felipe ContrerasNov 21, 2020
  12. Felipe ContrerasNov 21, 2020
  13. Jeff KingNov 24, 2020

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.