Skip to content

error cleanups in lock_ref_sha1_basic

Jeff King git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4error: save and restore errnousage.c+3 -05 replies
2/4lock_ref_sha1_basic: simplify errno handlingrefs.c+1 -62 replies
3/4lock_ref_sha1_basic: simplify error code pathrefs.c+4 -88 replies
4/4lock_ref_sha1_basic: do not die on locking errorsrefs.c+9 -21 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchJonathan NiederStefan Beller
1/4R-b R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] error cleanups in lock_ref_sha1_basic
Quoted 7 lines · Stefan Beller

From: Ronnie Sahlberg <[email protected]>

Change lock_ref_sha1_basic to return an error instead of dying, when we fail to lock a file during a transaction. This function is only called from transaction_commit() and it knows how to handle these failures.

Quoted 5 lines

[sb: This was part of a larger patch series, cherry-picked to master]

I think this is a good thing to do. I independently wrote the same patch recently, along with some other cleanups. Here's the series I ended up with (I added Ronnie as the author of the final one, which replaces this; even though my discovery was independent, he wrote it first :) ).

[1/4]: error: save and restore errno
[2/4]: lock_ref_sha1_basic: simplify errno handling [3/4]: lock_ref_sha1_basic: simplify error code path [4/4]: lock_ref_sha1_basic: do not die on locking errors

-Peff