summaryrefslogtreecommitdiff
path: root/rerere.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-08-31 16:14:27 -0700
committerJunio C Hamano <gitster@pobox.com>2010-08-31 16:14:27 -0700
commite24058f57f4e76e38e20390c5927590f3cd48085 (patch)
treed8f9b7149447d6d1be6ea847b807d247d3356fd4 /rerere.c
parentd8a94803842989582989fd5f5c3062c49134ad5b (diff)
parent7d7ff15b39abfa9e73b6475f189006a74dc26376 (diff)
downloadgit-e24058f57f4e76e38e20390c5927590f3cd48085.tar.gz
Merge branch 'sg/rerere-gc-old-still-used'
* 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 78bbcf1403..f42649c499 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));