summaryrefslogtreecommitdiff
path: root/examples/diff.c
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-04-15 15:47:38 -0700
committerVicent Martí <vicent@github.com>2013-04-15 15:47:38 -0700
commit24f61bc53a9843f86ce79bae92a38e0e4565734b (patch)
tree2cf068e5be081f7a0d1cfeeda948ac4eadead2c0 /examples/diff.c
parent54e05482348c3844c6002b3a96ab05264cf66993 (diff)
parent32ef1d1c7cc8c603ab78416262cc421b80a8c2df (diff)
downloadlibgit2-24f61bc53a9843f86ce79bae92a38e0e4565734b.tar.gz
Merge pull request #1469 from libgit2/vmg/unified-revision
Unified rev-parse, with a revision object
Diffstat (limited to 'examples/diff.c')
-rw-r--r--examples/diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/diff.c b/examples/diff.c
index a153b493b..2ef405665 100644
--- a/examples/diff.c
+++ b/examples/diff.c
@@ -17,8 +17,8 @@ static int resolve_to_tree(
int err = 0;
git_object *obj = NULL;
- if (git_revparse_single(&obj, repo, identifier) < 0)
- return GIT_ENOTFOUND;
+ if ((err = git_revparse_single(&obj, repo, identifier)) < 0)
+ return err;
switch (git_object_type(obj)) {
case GIT_OBJ_TREE: