From: Junio C Hamano Date: Wed, 21 Oct 2026 02:33:23 GMT Subject: Re: switch/checkout stops halfway when it fails to write tracking config Message-ID: In-Reply-To: 井上司 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.