Thread (41 messages) 41 messages, 2 authors, 2016-06-15

[PATCH v7 21/38] dump_marks(): remove a redundant call to rollback_lock_file()

flat view
DORMANTno replies REVIEWED: 1 (0M)

From: Michael Haggerty <hidden>
Date: 2016-06-15 23:02:37
Subsystem: the rest · Maintainer: Linus Torvalds

Revision v7 of 6 in this series; 1 review trailer.

Revisions (6)
  1. v2 [diff vs current]
  2. v3 [diff vs current]
  3. v4 [diff vs current]
  4. v5 [diff vs current]
  5. v6 [diff vs current]
  6. v7 current
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 <redacted>
Reviewed-by: Jonathan Nieder <redacted>
---
 fast-import.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fast-import.c b/fast-import.c
index 96b0f42..783c684 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;
 	}
 }
-- 
2.1.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help