Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-12-20 21:14:53 +0300
committerJunio C Hamano <gitster@pobox.com>2023-12-20 21:14:53 +0300
commitc4bf868bee2fe36c42c3033ceba725553d729ecf (patch)
tree9cf5045b3bec28f5b74af0e5f3b35b297a399de7 /t/t6009-rev-list-parent.sh
parent2d09302a01ecf53df3aa9997f7353fb4e845922c (diff)
parent71a1e94821666909b7b2bd62a36244c601f8430e (diff)
Merge branch 'jc/revision-parse-int'
The command line parser for the "log" family of commands was too loose when parsing certain numbers, e.g., silently ignoring the extra 'q' in "git log -n 1q" without complaining, which has been tightened up. * jc/revision-parse-int: revision: parse integer arguments to --max-count, --skip, etc., more carefully
Diffstat (limited to 't/t6009-rev-list-parent.sh')
-rwxr-xr-xt/t6009-rev-list-parent.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t6009-rev-list-parent.sh b/t/t6009-rev-list-parent.sh
index ced40157ed..91db8fafe8 100755
--- a/t/t6009-rev-list-parent.sh
+++ b/t/t6009-rev-list-parent.sh
@@ -63,6 +63,17 @@ test_expect_success 'setup roots, merges and octopuses' '
git checkout main
'
+test_expect_success 'parse --max-parents & --min-parents' '
+ test_must_fail git rev-list --max-parents=1q HEAD 2>error &&
+ grep "not an integer" error &&
+
+ test_must_fail git rev-list --min-parents=1q HEAD 2>error &&
+ grep "not an integer" error &&
+
+ git rev-list --max-parents=1 --min-parents=1 HEAD &&
+ git rev-list --max-parents=-1 --min-parents=-1 HEAD
+'
+
test_expect_success 'rev-list roots' '
check_revlist "--max-parents=0" one five