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

Re: switch/checkout stops halfway when it fails to write tracking config

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 21, 2026, 02:33 UTC
Message-ID
<xmqqecdjsryk.fsf@gitster.g>
In-Reply-To
<CAP8tz2JNxfOZC1W4gvGSJ-=AzY7iBADj_KtzWb4sawyqjQ0hHw@mail.gmail.com>
井上司 <inoue.tsukasa.4@gmail.com> writes:
Show 13 quoted lines
> Thanks for the reply.
>
> I agree with your point. However, implementing full atomicity now would
> be a large change, for two reasons:
>
> - push -u, clone and fetch continue even when writing the tracking config
>   fails, but setup_tracking() calls exit() and aborts the process.
> - For full atomicity, we would need to undo the worktree, the ref and the
>   config. We would also need to handle the die() calls in checkout.
>
> So I propose to make setup_tracking() return an error instead of calling
> exit(), so that switch and checkout can behave like the other callers,
> and to leave full atomicity as a separate topic.
Sounds like a good direction to go.
Previous: 井上司Next: D. Ben Knoble
Message 4 of 9 in “switch/checkout stops halfway when it fails to write tracking config”
  1. 井上司Oct 20, 2026
  2. Junio C HamanoOct 20, 2026
  3. 井上司Oct 20, 2026
  4. Junio C HamanoOct 21, 2026
  5. D. Ben KnobleOct 20, 2026
  6. 井上司Oct 20, 2026
  7. D. Ben KnobleOct 22, 2026
  8. 井上司Oct 22, 2026
  9. 井上司Nov 8, 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.