summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b188258)
raw | patch | inline | side by side (parent: b188258)
author | Junio C Hamano <junkio@cox.net> | |
Mon, 2 Apr 2007 04:13:27 +0000 (21:13 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 5 Apr 2007 22:07:16 +0000 (15:07 -0700) |
This error message should not usually trigger, but the function
make_cache_entry() called by add_cacheinfo() can return early
without calling into refresh_cache_entry() that sets cache_errno.
Also the error message had a wrong function name reported, and
it did not say anything about which path failed either.
Signed-off-by: Junio C Hamano <junkio@cox.net>
make_cache_entry() called by add_cacheinfo() can return early
without calling into refresh_cache_entry() that sets cache_errno.
Also the error message had a wrong function name reported, and
it did not say anything about which path failed either.
Signed-off-by: Junio C Hamano <junkio@cox.net>
cache.h | patch | blob | history | |
merge-recursive.c | patch | blob | history | |
read-cache.c | patch | blob | history |
index 1f128d55d206e59ed42e04244a3a77728bae8593..467e6a579aa4ef1de9df8e76cb09afa6abfe1646 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -128,7 +128,6 @@ static inline unsigned int ce_mode_from_stat(struct cache_entry *ce, unsigned in
extern struct cache_entry **active_cache;
extern unsigned int active_nr, active_alloc, active_cache_changed;
extern struct cache_tree *active_cache_tree;
-extern int cache_errno;
enum object_type {
OBJ_BAD = -1,
diff --git a/merge-recursive.c b/merge-recursive.c
index e1aebd77274bb75e9fda95b2d64f69a9dda4276a..3611a2bdb7039f155287f2b706170f76cb6c5c2f 100644 (file)
--- a/merge-recursive.c
+++ b/merge-recursive.c
struct cache_entry *ce;
ce = make_cache_entry(mode, sha1 ? sha1 : null_sha1, path, stage, refresh);
if (!ce)
- return error("cache_addinfo failed: %s", strerror(cache_errno));
+ return error("addinfo_cache failed for path '%s'", path);
return add_cache_entry(ce, options);
}
diff --git a/read-cache.c b/read-cache.c
index 6339a278da1ae1b323b5abf7d2604c7afdfde4e4..8a7506d909421479eee30517ab3f3963c67cefd9 100644 (file)
--- a/read-cache.c
+++ b/read-cache.c
struct cache_tree *active_cache_tree;
-int cache_errno;
+static int cache_errno;
static void *cache_mmap;
static size_t cache_mmap_size;