Skip to content

Commit 2524115

Browse files
derrickstoleegitster
authored andcommitted
t5620: test backfill's unknown argument handling
Before the recent changes to parse rev-list arguments inside of 'git backfill', the builtin would take arbitrary arguments without complaint (and ignore them). This was noticed and a patch was sent [1] which motivates this change to encode this behavior in test. [1] https://lore.kernel.org/git/20260321031643.5185-1-r.siddharth.shrimali@gmail.com/ Reported-by: Siddharth Shrimali <r.siddharth.shrimali@gmail.com> Signed-off-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 3fb2581 commit 2524115

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

t/t5620-backfill.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
77

88
. ./test-lib.sh
99

10+
test_expect_success 'backfill rejects unexpected arguments' '
11+
test_must_fail git backfill unexpected-arg 2>err &&
12+
test_grep "ambiguous argument .*unexpected-arg" err &&
13+
14+
test_must_fail git backfill --all --firt-parent unexpected-arg 2>err &&
15+
test_grep "ambiguous argument .*unexpected-arg" err
16+
'
17+
1018
# We create objects in the 'src' repo.
1119
test_expect_success 'setup repo for object creation' '
1220
echo "{print \$1}" >print_1.awk &&

0 commit comments

Comments
 (0)