From: Junio C Hamano Date: Mon, 02 Oct 2017 04:01:36 GMT Subject: Re: [PATCH 11/11] read-cache: roll back lock on error with `COMMIT_LOCK` Message-ID: In-Reply-To: <26a9c90a6478ec9ddb4ce34923e251ebe9323ab2.1506862824.git.martin.agren@gmail.com> Martin Ă…gren writes: > Teach `write_locked_index(..., COMMIT_LOCK)` to roll back the lock > before returning. If we have already succeeded and committed, it will be > a noop. Simplify the existing callers where we now have a superfluous > call to `rollback_lockfile()`. This should keep future readers from > wondering why the callers are inconsistent. Makes sense. Thanks for cleaning up. The split-index codepath was something I've never reviewed seriously with fine toothed comb, and I feel a lot better now knowing that somebody other than its authors and me have read it through ;-)