diff options
author | Junio C Hamano <junkio@cox.net> | 2005-09-02 15:32:55 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-09-02 15:32:55 -0700 |
commit | 8afaf4cbefc735d71d1417a74b9cc20b0e3c6770 (patch) | |
tree | 6b69c478f0570cff1231b9fe3462c50062860ec4 /update-cache.c | |
parent | 80b52b0f9d04fa0b8863fef2beef937ee1a486ae (diff) | |
parent | 953e5842f8fcd40c3e7013a9793746719016db1b (diff) | |
download | git-8afaf4cbefc735d71d1417a74b9cc20b0e3c6770.tar.gz git-8afaf4cbefc735d71d1417a74b9cc20b0e3c6770.tar.xz |
Merge branch 'master' of .
Diffstat (limited to 'update-cache.c')
-rw-r--r-- | update-cache.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/update-cache.c b/update-cache.c index 63815ed65..3d1fd2be7 100644 --- a/update-cache.c +++ b/update-cache.c @@ -53,7 +53,11 @@ static int add_file_to_cache(char *path) if (allow_remove) return remove_file_from_cache(path); } - return error("open(\"%s\"): %s", path, strerror(errno)); + if (0 == status) + return error("%s: is a directory", path); + else + return error("lstat(\"%s\"): %s", path, + strerror(errno)); } namelen = strlen(path); size = cache_entry_size(namelen); @@ -393,7 +397,7 @@ int main(int argc, char **argv) continue; } if (add_file_to_cache(path)) - die("Unable to add %s to database", path); + die("Unable to add %s to database; maybe you want to use --add option?", path); } if (write_cache(newfd, active_cache, active_nr) || commit_index_file(&cache_file)) |