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

Re: [PATCH 0/2] checkout: finish switch when tracking config cannot be written

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 23, 2026, 18:30 UTC
Message-ID
<xmqqmrs45kx2.fsf@gitster.g>
In-Reply-To
<pull.2275.git.1792637495.gitgitgadget@gmail.com>
"tsukasa-ino via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 9 quoted lines
> When the tracking config cannot be written (for example, because
> .git/config.lock exists), git switch -c and checkout -b stop halfway. The
> worktree, the index and the new branch ref are already updated, but HEAD
> stays on the old branch, and the changes are left staged.
>
>  * 1/2 makes setup_tracking() return an error instead of calling exit(). No
>    behavior change yet.
>  * 2/2 makes switch and checkout finish the switch and exit with status 0,
>    as push -u, clone and fetch already do. git branch still fails.
Thanks, queued.
Previous: tsukasa inoue via GitGitGadget
Message 4 of 4 in “checkout: finish switch when tracking config cannot be written”
  1. 0/2 checkout: finish switch when tracking config cannot be writtentsukasa-ino via GitGitGadget, Oct 22, 2026
  2. 1/2 branch: return an error from setup_tracking()tsukasa inoue via GitGitGadget, Oct 22, 2026
  3. 2/2 checkout: finish switching when the tracking config cannot be writtentsukasa inoue via GitGitGadget, Oct 22, 2026
  4. Junio C HamanoOct 23, 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.