Thread (8 messages) flat view 8 messages, 3 authors, 2016-06-15

Re: [PATCH v2] rerere: fix overeager gc

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:49:03

Am 7/1/2010 11:36, schrieb SZEDER Gábor:
-static time_t rerere_created_at(const char *name)
+static time_t rerere_last_checked_at(const char *name)
rerere_last_used_at?
quoted hunk ↗ jump to hunk
@@ -378,7 +378,13 @@ static int merge(const char *name, const char *path)
 	}
 	ret = ll_merge(&result, path, &base, NULL, &cur, "", &other, "", 0);
 	if (!ret) {
-		FILE *f = fopen(path, "w");
+		FILE *f;
+
+		if (utime(rerere_path(name, "preimage"), NULL) < 0)
+			warning("failed utime() on %s: %s",
+					rerere_path(name, "preimage"),
+					strerror(errno));
+		f = fopen(path, "w");
I think this should be outside of 'if (!ret)' condition because even if
the merge fails, the resolution was *used*.

Mental note: update mingw_utime to accept NULL for the second parameter...

-- Hannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help