From: Petr Baudis Date: Tue, 26 Apr 2005 19:04:55 +0000 (+0200) Subject: Make update-cache be explicit about failed open() when doing X-Git-Tag: v0.99~596 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=071c41a047e4c851836669648716e361f8e0b5ad;p=git.git Make update-cache be explicit about failed open() when doing add_file_to_cache(). --- diff --git a/update-cache.c b/update-cache.c index 2f5d620f..d7caed64 100644 --- a/update-cache.c +++ b/update-cache.c @@ -73,7 +73,7 @@ static int add_file_to_cache(char *path) if (allow_remove) return remove_file_from_cache(path); } - return -1; + return error("open(\"%s\"): %s", path, strerror(errno)); } namelen = strlen(path); size = cache_entry_size(namelen);