X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=rerere.c;h=1d951617ee2f92676a6e3ff4b809b716481a7847;hb=9904fadfea002edf2ef22e8ec9a978e45d1f540b;hp=d03a69634b81e1146c20182670a400b0c29b275f;hpb=a76b2084fb9c7e788108717fdce4c91227808980;p=git.git diff --git a/rerere.c b/rerere.c index d03a69634..1d951617e 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));