summaryrefslogtreecommitdiff
path: root/rerere.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-09-01 13:57:23 -0700
committerJunio C Hamano <gitster@pobox.com>2010-09-01 13:57:23 -0700
commitc7f649a794250ca680569bd8c2466af42acb434a (patch)
tree25e2df69993bb180b1785cb2577cc2cc2ca62ca7 /rerere.c
parente4f8fce5c18c9544d3f1a07929fc14e7cbddbcc3 (diff)
parent7d7ff15b39abfa9e73b6475f189006a74dc26376 (diff)
downloadgit-c7f649a794250ca680569bd8c2466af42acb434a.tar.gz
Merge branch 'sg/rerere-gc-old-still-used' into maint
* sg/rerere-gc-old-still-used: rerere: fix overeager gc mingw_utime(): handle NULL times parameter
Diffstat (limited to 'rerere.c')
-rw-r--r--rerere.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/rerere.c b/rerere.c
index d03a69634b..1d951617ee 100644
--- a/rerere.c
+++ b/rerere.c
@@ -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, "postimage"), NULL) < 0)
+ warning("failed utime() on %s: %s",
+ rerere_path(name, "postimage"),
+ strerror(errno));
+ f = fopen(path, "w");
if (!f)
return error("Could not open %s: %s", path,
strerror(errno));