path: root/merge-recursive.c
diff options
authorJunio C Hamano <>2007-04-02 04:13:27 (GMT)
committerJunio C Hamano <>2007-04-05 22:07:16 (GMT)
commit0424138d5715dbf8605bacfbd22210aac85a1a8f (patch)
treed3e540a33cad4074ceb50f04e8b5a2b3bb6c5fc8 /merge-recursive.c
parentb18825876ae60e67e646097945c8365779175ee2 (diff)
Fix bogus error message from merge-recursive error path
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 <>
Diffstat (limited to 'merge-recursive.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index e1aebd7..3611a2b 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -221,7 +221,7 @@ static int add_cacheinfo(unsigned int mode, const unsigned char *sha1,
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);