Re: [PATCH v2] rerere: fix overeager gc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 7/1/2010 11:36, schrieb SZEDER Gábor:
> -static time_t rerere_created_at(const char *name)
> +static time_t rerere_last_checked_at(const char *name)

rerere_last_used_at?

> @@ -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, "preimage"), NULL) < 0)
> +			warning("failed utime() on %s: %s",
> +					rerere_path(name, "preimage"),
> +					strerror(errno));
> +		f = fopen(path, "w");

I think this should be outside of 'if (!ret)' condition because even if
the merge fails, the resolution was *used*.

Mental note: update mingw_utime to accept NULL for the second parameter...

-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]