X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=rerere.c;h=861ca7c815b4857f1fde399617860e5a179e2ca3;hb=5c947e2c386aea5c94546c7a40a0d4d7f7b3934a;hp=78bbcf140346f14bbb961ed5e39e5752568b8d95;hpb=613e4e5f4046ee36f40199cbaeb9f35442d24378;p=git.git diff --git a/rerere.c b/rerere.c index 78bbcf140..861ca7c81 100644 --- a/rerere.c +++ b/rerere.c @@ -319,6 +319,10 @@ static int handle_cache(const char *path, unsigned char *sha1, const char *outpu if (!mmfile[i].ptr && !mmfile[i].size) mmfile[i].ptr = xstrdup(""); } + /* + * NEEDSWORK: handle conflicts from merges with + * merge.renormalize set, too + */ ll_merge(&result, path, &mmfile[0], NULL, &mmfile[1], "ours", &mmfile[2], "theirs", 0); @@ -378,7 +382,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));