summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/refs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/refs.c b/src/refs.c
index a15e31b53..26c80021f 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -289,6 +289,9 @@ cleanup:
"Could not use '%s' as valid reference name", git_buf_cstr(&name));
}
+ if (error == GIT_ENOTFOUND)
+ giterr_set(GITERR_REFERENCE, "no reference found for shorthand '%s'", refname);
+
git_buf_free(&name);
git_buf_free(&refnamebuf);
return error;