summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-12-18 15:13:11 -0800
committerRussell Belfer <rb@github.com>2013-01-04 15:23:47 -0800
commit6fee906c982d001062968b4caee4f289f0c86b59 (patch)
treecf1824bf846e2db49ef627109b172a6df6251720 /src
parent6ac724afbe0b1244f84b9acc5dc8be0646be5ce3 (diff)
downloadlibgit2-6fee906c982d001062968b4caee4f289f0c86b59.tar.gz
missing error message is confusing
Diffstat (limited to 'src')
-rw-r--r--src/index.c3
1 files changed, 3 insertions, 0 deletions
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.