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:53 UTC
Message-ID
<CAMP44s2yi2v8ghoQ7ZsuxnFU66Hps1DRn3a1ytqBOqS2+pzLsA@mail.gmail.com>
In-Reply-To
<xmqq3613tuwy.fsf@gitster.c.googlers.com>
On Fri, Nov 20, 2020 at 6:28 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
>
> Jeff King <peff@peff.net> writes:
>
> > Thanks for working on this. Regardless of whether we change the default
> > behavior, this seems like an obvious improvement (and I do think it
> > makes sense to eventually change the default; I'd even be OK switching
> > it to "missing" in the near term).
>
> I agree that "missing" would be an easy thing to take, and I do not
> mind seeing it made the default in the near term.  It won't break
> existing expectations too much, and can even be seen as a bugfix for
> the current behaviour by making "init && fetch" a step closer to
> "clone".  Beyond that to modify what the end user already has is a
> much harder sell.  For some it may be an improvement, but for others
> it would be a breaking change.

Changing the default to "missing" breaks a lot of tests. I already have the fixes for the tests, but this can be seen as an indication that the expectations of users would change.

I never knew of this $remote/HEAD feature, and searching forums some people seem perplexed by its existence and ask how to remove it.

So, if the "missing" behavior is the one we are targeting (which I argue we should), we probably need a warning before doing the flip, so that users become aware of the feature and are not surprised by a sudden $remote/HEAD popping (or repopping) seemingly out of nowhere.

Cheers.
-- 
Felipe Contreras
Previous: Jeff KingNext: Felipe Contreras
Message 11 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.