From: Junio C Hamano <gitster@pobox.com>
To: "tsukasa-ino via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Harald Nordgren <haraldnordgren@gmail.com>,
tsukasa-ino <inoue.tsukasa.4@gmail.com>
Subject: Re: [PATCH 0/2] checkout: finish switch when tracking config cannot be written
Date: Fri, 23 Oct 2026 11:30:49 -0700 [thread overview]
Message-ID: <xmqqmrs45kx2.fsf@gitster.g> (raw)
In-Reply-To: <pull.2275.git.1792637495.gitgitgadget@gmail.com> (tsukasa-ino via GitGitGadget's message of "Thu, 22 Oct 2026 02:51:33 +0000")
"tsukasa-ino via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 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.
prev parent reply other threads:[~2026-10-23 18:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 2:51 [PATCH 0/2] checkout: finish switch when tracking config cannot be written tsukasa-ino via GitGitGadget
2026-10-22 2:51 ` [PATCH 1/2] branch: return an error from setup_tracking() tsukasa inoue via GitGitGadget
2026-10-22 2:51 ` [PATCH 2/2] checkout: finish switching when the tracking config cannot be written tsukasa inoue via GitGitGadget
2026-10-23 18:30 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqmrs45kx2.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=haraldnordgren@gmail.com \
--cc=inoue.tsukasa.4@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox