summaryrefslogtreecommitdiff
path: root/tests/refs/peel.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-11-19 18:42:29 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2014-11-22 18:55:22 +0100
commit753e17b0f518c2510848a9dd73cc45e4c6df1a8a (patch)
tree39b27d69fa709024ba8b786c04bc66264d9cd97b /tests/refs/peel.c
parent4d86caec599ab760b523a026040bc4f40f8338c9 (diff)
downloadlibgit2-753e17b0f518c2510848a9dd73cc45e4c6df1a8a.tar.gz
peel: reject bad queries with EINVALIDSPECcmn/peeling-errors
There are some combination of objects and target types which we know cannot be fulfilled. Return EINVALIDSPEC for those to signify that there is a mismatch in the user-provided data and what the object model is capable of satisfying. If we start at a tag and in the course of peeling find out that we cannot reach a particular type, we return EPEEL.
Diffstat (limited to 'tests/refs/peel.c')
-rw-r--r--tests/refs/peel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/refs/peel.c b/tests/refs/peel.c
index 542694c47..83f6109c0 100644
--- a/tests/refs/peel.c
+++ b/tests/refs/peel.c
@@ -93,7 +93,7 @@ void test_refs_peel__can_peel_a_symbolic_reference(void)
void test_refs_peel__cannot_peel_into_a_non_existing_target(void)
{
- assert_peel_error(GIT_ENOTFOUND, "refs/tags/point_to_blob", GIT_OBJ_TAG);
+ assert_peel_error(GIT_EINVALIDSPEC, "refs/tags/point_to_blob", GIT_OBJ_TAG);
}
void test_refs_peel__can_peel_into_any_non_tag_object(void)