summaryrefslogtreecommitdiff
path: root/t/t1506-rev-parse-diagnosis.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t1506-rev-parse-diagnosis.sh')
-rwxr-xr-xt/t1506-rev-parse-diagnosis.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t1506-rev-parse-diagnosis.sh b/t/t1506-rev-parse-diagnosis.sh
index 21a9c8f..624d0a5 100755
--- a/t/t1506-rev-parse-diagnosis.sh
+++ b/t/t1506-rev-parse-diagnosis.sh
@@ -214,4 +214,12 @@ test_expect_success 'arg before dashdash must be a revision (ambiguous)' '
test_cmp expect actual
'
+test_expect_success 'reject Nth parent if N is too high' '
+ test_must_fail git rev-parse HEAD^100000000000000000000000000000000
+'
+
+test_expect_success 'reject Nth ancestor if N is too high' '
+ test_must_fail git rev-parse HEAD~100000000000000000000000000000000
+'
+
test_done