summaryrefslogtreecommitdiff
path: root/update-cache.c
diff options
context:
space:
mode:
authorPetr Baudis <pasky@ucw.cz>2005-04-26 19:04:55 (GMT)
committerPetr Baudis <xpasky@machine.sinus.cz>2005-05-11 20:37:58 (GMT)
commit071c41a047e4c851836669648716e361f8e0b5ad (patch)
tree952f6d0737828e1001a47689a33d860e3b165bb0 /update-cache.c
parentd81ed1b591b1db413c91e29b66de6a14dc543ffc (diff)
downloadgit-071c41a047e4c851836669648716e361f8e0b5ad.zip
git-071c41a047e4c851836669648716e361f8e0b5ad.tar.gz
git-071c41a047e4c851836669648716e361f8e0b5ad.tar.bz2
Make update-cache be explicit about failed open() when doing
add_file_to_cache().
Diffstat (limited to 'update-cache.c')
-rw-r--r--update-cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/update-cache.c b/update-cache.c
index 2f5d620..d7caed6 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);