Re: [PATCH v2 11/12] read-cache: leave lock in right state in `write_locked_index()`

2017-10-06 Thread Martin Ågren
On 6 October 2017 at 14:02, Junio C Hamano wrote: > Martin Ågren writes: > >> On 6 October 2017 at 04:01, Junio C Hamano wrote: >>> Martin Ågren writes: >>> v2: Except for the slightly different

Re: [PATCH v2 11/12] read-cache: leave lock in right state in `write_locked_index()`

2017-10-06 Thread Junio C Hamano
Martin Ågren writes: > On 6 October 2017 at 04:01, Junio C Hamano wrote: >> Martin Ågren writes: >> >>> v2: Except for the slightly different documentation in cache.h, this is >>> a squash of the last two patches of v1. I hope

Re: [PATCH v2 11/12] read-cache: leave lock in right state in `write_locked_index()`

2017-10-06 Thread Martin Ågren
On 6 October 2017 at 04:01, Junio C Hamano wrote: > Martin Ågren writes: > >> v2: Except for the slightly different documentation in cache.h, this is >> a squash of the last two patches of v1. I hope the commit message is >> better. > > Yeah, it is long

Re: [PATCH v2 11/12] read-cache: leave lock in right state in `write_locked_index()`

2017-10-05 Thread Junio C Hamano
Martin Ågren writes: > v2: Except for the slightly different documentation in cache.h, this is > a squash of the last two patches of v1. I hope the commit message is > better. Yeah, it is long ;-) but readable. Thanks.

[PATCH v2 11/12] read-cache: leave lock in right state in `write_locked_index()`

2017-10-05 Thread Martin Ågren
If the original version of `write_locked_index()` returned with an error, it didn't roll back the lockfile unless the error occured at the very end, during closing/committing. See commit 03b866477 (read-cache: new API write_locked_index instead of write_index/write_cache, 2014-06-13). In commit