From 6fee906c982d001062968b4caee4f289f0c86b59 Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Tue, 18 Dec 2012 15:13:11 -0800 Subject: [PATCH] missing error message is confusing --- src/index.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/index.c b/src/index.c index c04796875..9f2012b3a 100644 --- a/src/index.c +++ b/src/index.c @@ -814,7 +814,10 @@ int git_index_find(git_index *index, const char *path) if ((pos = git_vector_bsearch2( &index->entries, index->entries_search_path, path)) < 0) + { + giterr_set(GITERR_INDEX, "Index does not contain %s", path); return pos; + } /* Since our binary search only looked at path, we may be in the * middle of a list of stages.