summaryrefslogtreecommitdiff
path: root/src/object.c
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-05-12 01:42:21 -0700
committerVicent Martí <tanoku@gmail.com>2012-05-12 01:42:21 -0700
commitcd062ee27fd2e0adea71a14704c089a745695913 (patch)
treeeab352e198ef4813607e72f1bac62288019f096d /src/object.c
parent41178b419a5fcf3a65c2b313ecc688c607f411c9 (diff)
parente28c37761bc8087164e6886f7f267beb1325655f (diff)
downloadlibgit2-cd062ee27fd2e0adea71a14704c089a745695913.tar.gz
Merge pull request #687 from nulltoken/fix/object-lookup-take-2
object: make git_object_lookup() return GIT_ENOTFOUND - The sequel
Diffstat (limited to 'src/object.c')
-rw-r--r--src/object.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/object.c b/src/object.c
index 02be5dac8..deeacb27c 100644
--- a/src/object.c
+++ b/src/object.c
@@ -109,8 +109,8 @@ int git_object_lookup_prefix(
if (object != NULL) {
if (type != GIT_OBJ_ANY && type != object->type) {
git_object_free(object);
- giterr_set(GITERR_INVALID, "The given type does not match the type in ODB");
- return -1;
+ giterr_set(GITERR_ODB, "The given type does not match the type in ODB");
+ return GIT_ENOTFOUND;
}
*object_out = object;