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

Re: [PATCH] fetch: optionally allow disabling FETCH_HEAD update

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 13, 2020, 19:45 UTC
Message-ID
<xmqq7dv7nqqo.fsf@gitster.c.googlers.com>
In-Reply-To
<20200713190834.GA77607@syl.lan>
Taylor Blau <me@ttaylorr.com> writes:
Show 7 quoted lines
>> -	const char *filename = dry_run ? "/dev/null" : git_path_fetch_head(the_repository);
>> +	const char *filename = (!write_fetch_head
>> +				? "/dev/null"
>> +				: git_path_fetch_head(the_repository));
>
> Ah, because dry_run ==> !write_fetch_head, so this is an equivalent
> translation. Makes sense.

Yup, now dry_run is merely one of the two cases we turn write_fetch_head off, and the logic to prevent us from writing FETCH_HEAD (hopefully without any other side effect) was already there in this function.

> Test coverage all looks good, thanks for working on this. I don't think
> there's anything left, so this would be great after 2.28 is released.
>
>   Reviewed-by: Taylor Blau <me@ttaylorr.com>
Thanks.
Previous: Taylor BlauNext: Konstantin Ryabitsev
Message 12 of 19 in “FETCH_HEAD files and mirrored repos”
  1. Konstantin RyabitsevJul 11, 2020
  2. Junio C HamanoJul 11, 2020
  3. Konstantin RyabitsevJul 11, 2020
  4. Junio C HamanoJul 12, 2020
  5. Konstantin RyabitsevJul 12, 2020
  6. Junio C HamanoJul 12, 2020
  7. Konstantin RyabitsevJul 12, 2020
  8. Johannes SixtJul 13, 2020
  9. Junio C HamanoJul 13, 2020
  10. fetch: optionally allow disabling FETCH_HEAD updateJunio C Hamano, Jul 13, 2020
  11. Taylor BlauJul 13, 2020
  12. Junio C HamanoJul 13, 2020
  13. Konstantin RyabitsevJul 13, 2020
  14. Junio C HamanoJul 13, 2020
  15. Jeff KingJul 13, 2020
  16. Konstantin RyabitsevJul 13, 2020
  17. Jeff KingJul 13, 2020
  18. Johannes SixtJul 13, 2020
  19. Jonathan NiederJul 14, 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.