Thread (1 message) 1 message, 1 author, 2017-10-06

Re: [PATCH v2 01/12] sha1_file: do not leak `lock_file`

From: Junio C Hamano <hidden>
Date: 2017-10-06 01:17:50

Martin Ågren [off-list ref] writes:
Bump `found` to the scope of the whole function and rearrange the "roll
back or write?"-checks to a straightforward if-else on `found`. This
also future-proves the code by making it obvious that we intend to take
exactly one of these paths.

Improved-by: Jeff King [off-list ref]
Signed-off-by: Martin Ågren <redacted>
---
v2: Moved the rollback to the end to have an obvious if-else instead of
retaining the original logic. Thanks Peff.
Yup, both are correct but this version is 10x easier to follow.
Thanks, both.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help