diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-08-31 16:14:27 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-31 16:14:27 -0700 |
commit | e24058f57f4e76e38e20390c5927590f3cd48085 (patch) | |
tree | d8f9b7149447d6d1be6ea847b807d247d3356fd4 /rerere.c | |
parent | d8a94803842989582989fd5f5c3062c49134ad5b (diff) | |
parent | 7d7ff15b39abfa9e73b6475f189006a74dc26376 (diff) | |
download | git-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.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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)); |