From: Michael Haggerty Date: Wed, 1 Oct 2014 10:28:25 +0000 (+0200) Subject: dump_marks(): remove a redundant call to rollback_lock_file() X-Git-Tag: v2.2.0-rc0~53^2~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=32c3ec258e8b12ba29ce591b09a300621dba9b3a;p=thirdparty%2Fgit.git dump_marks(): remove a redundant call to rollback_lock_file() When commit_lock_file() fails, it now always calls rollback_lock_file() internally, so there is no need to call that function here. Signed-off-by: Michael Haggerty Reviewed-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- diff --git a/fast-import.c b/fast-import.c index 96b0f4236a..783c6840b5 100644 --- a/fast-import.c +++ b/fast-import.c @@ -1832,10 +1832,8 @@ static void dump_marks(void) } if (commit_lock_file(&mark_lock)) { - int saved_errno = errno; - rollback_lock_file(&mark_lock); failure |= error("Unable to commit marks file %s: %s", - export_marks_file, strerror(saved_errno)); + export_marks_file, strerror(errno)); return; } }