Thread (1 message) 1 message, 1 author, 2023-03-24

Re: [PATCH] sequencer: remove pointless rollback_lock_file()

From: Junio C Hamano <hidden>
Date: 2023-03-24 14:51:08

Oswald Buddenhagen [off-list ref] writes:
The file is gone even if commit_lock_file() fails.
Good spotting.  

I glanced over hits from "git grep -A6 commit_lock_file \*.c" to see
if there is a similar mistake, but this seems to be the only one.

Will queue.  Thanks.
quoted hunk
Signed-off-by: Oswald Buddenhagen <redacted>
---
 sequencer.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/sequencer.c b/sequencer.c
index 3be23d7ca2..2da9b9f890 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -3676,7 +3676,6 @@ static int safe_append(const char *filename, const char *fmt, ...)
 	}
 	if (commit_lock_file(&lock) < 0) {
 		strbuf_release(&buf);
-		rollback_lock_file(&lock);
 		return error(_("failed to finalize '%s'"), filename);
 	}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help