diff options
Diffstat (limited to 'refs/packed-backend.c')
-rw-r--r-- | refs/packed-backend.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/refs/packed-backend.c b/refs/packed-backend.c index 412c85034f..dca887c0fe 100644 --- a/refs/packed-backend.c +++ b/refs/packed-backend.c @@ -545,8 +545,9 @@ int packed_refs_lock(struct ref_store *ref_store, int flags, struct strbuf *err) return -1; } - if (close_lock_file(&refs->lock)) { + if (close_lock_file_gently(&refs->lock)) { strbuf_addf(err, "unable to close %s: %s", refs->path, strerror(errno)); + rollback_lock_file(&refs->lock); return -1; } |