From: Junio C Hamano <gitster@pobox.com>
To: 井上司 <inoue.tsukasa.4@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: switch/checkout stops halfway when it fails to write tracking config
Date: Tue, 20 Oct 2026 19:33:23 -0700 [thread overview]
Message-ID: <xmqqecdjsryk.fsf@gitster.g> (raw)
In-Reply-To: <CAP8tz2JNxfOZC1W4gvGSJ-=AzY7iBADj_KtzWb4sawyqjQ0hHw@mail.gmail.com> ("井上司"'s message of "Tue, 20 Oct 2026 15:33:51 +0900")
井上司 <inoue.tsukasa.4@gmail.com> writes:
> 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.
next prev parent reply other threads:[~2026-10-21 2:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 1:39 switch/checkout stops halfway when it fails to write tracking config 井上司
2026-10-20 4:11 ` Junio C Hamano
2026-10-20 6:33 ` 井上司
2026-10-21 2:33 ` Junio C Hamano [this message]
2026-10-20 13:06 ` D. Ben Knoble
2026-10-20 15:08 ` 井上司
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=xmqqecdjsryk.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--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