summaryrefslogtreecommitdiff
path: root/src/index.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-07-08 18:22:44 +0200
committerVicent Marti <tanoku@gmail.com>2011-07-09 02:40:15 +0200
commitf0ab9fda8b566fffb704527b19556df3ef10738e (patch)
tree5c3f1057babd340fcdb6ab33fb78225d533f87cb /src/index.c
parentd102bbba46ea29e42eff2793fb46e14fbc597213 (diff)
downloadlibgit2-f0ab9fda8b566fffb704527b19556df3ef10738e.tar.gz
index: Return `GIT_ENOTFOUND` when an entry cannot be opened
Diffstat (limited to 'src/index.c')
-rw-r--r--src/index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c
index 986bcc0b9..af98cdc4b 100644
--- a/src/index.c
+++ b/src/index.c
@@ -427,7 +427,7 @@ static int index_init_entry(git_index_entry *entry, git_index *index, const char
git_path_join(full_path, index->repository->path_workdir, rel_path);
if (p_lstat(full_path, &st) < 0)
- return git__throw(GIT_EOSERR, "Failed to initialize entry. '%s' cannot be opened", full_path);
+ return git__throw(GIT_ENOTFOUND, "Failed to initialize entry. '%s' cannot be opened", full_path);
if (stage < 0 || stage > 3)
return git__throw(GIT_ERROR, "Failed to initialize entry. Invalid stage %i", stage);