Skip to content

Commit 7abc186

Browse files
spectre10gitster
authored andcommitted
add -p tests: remove PERL prerequisites
The Perl version of the add -i/-p commands has been removed since 20b813d (add: remove "add.interactive.useBuiltin" & Perl "git add--interactive", 2023-02-07) Therefore, Perl prerequisite in the test scripts which use the patch mode functionality is not neccessary. Signed-off-by: Ghanshyam Thakkar <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5a8ed3f commit 7abc186

File tree

6 files changed

+27
-39
lines changed

6 files changed

+27
-39
lines changed

t/t2024-checkout-dwim.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ test_expect_success 'checkout of branch from multiple remotes fails with advice'
113113
test_grep ! "^hint: " stderr
114114
'
115115

116-
test_expect_success PERL 'checkout -p with multiple remotes does not print advice' '
116+
test_expect_success 'checkout -p with multiple remotes does not print advice' '
117117
git checkout -B main &&
118118
test_might_fail git branch -D foo &&
119119

t/t2071-restore-patch.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ test_description='git restore --patch'
44

55
. ./lib-patch-mode.sh
66

7-
test_expect_success PERL 'setup' '
7+
test_expect_success 'setup' '
88
mkdir dir &&
99
echo parent >dir/foo &&
1010
echo dummy >bar &&
@@ -16,28 +16,28 @@ test_expect_success PERL 'setup' '
1616
save_head
1717
'
1818

19-
test_expect_success PERL 'restore -p without pathspec is fine' '
19+
test_expect_success 'restore -p without pathspec is fine' '
2020
echo q >cmd &&
2121
git restore -p <cmd
2222
'
2323

2424
# note: bar sorts before dir/foo, so the first 'n' is always to skip 'bar'
2525

26-
test_expect_success PERL 'saying "n" does nothing' '
26+
test_expect_success 'saying "n" does nothing' '
2727
set_and_save_state dir/foo work head &&
2828
test_write_lines n n | git restore -p &&
2929
verify_saved_state bar &&
3030
verify_saved_state dir/foo
3131
'
3232

33-
test_expect_success PERL 'git restore -p' '
33+
test_expect_success 'git restore -p' '
3434
set_and_save_state dir/foo work head &&
3535
test_write_lines n y | git restore -p &&
3636
verify_saved_state bar &&
3737
verify_state dir/foo head head
3838
'
3939

40-
test_expect_success PERL 'git restore -p with staged changes' '
40+
test_expect_success 'git restore -p with staged changes' '
4141
set_state dir/foo work index &&
4242
test_write_lines n y | git restore -p &&
4343
verify_saved_state bar &&
@@ -46,7 +46,7 @@ test_expect_success PERL 'git restore -p with staged changes' '
4646

4747
for opt in "HEAD" "@"
4848
do
49-
test_expect_success PERL "git restore -p --source=$opt" '
49+
test_expect_success "git restore -p --source=$opt" '
5050
set_state dir/foo work index &&
5151
# the third n is to get out in case it mistakenly does not apply
5252
test_write_lines n y n | git restore -p --source=$opt >output &&
@@ -56,23 +56,23 @@ do
5656
'
5757
done
5858

59-
test_expect_success PERL 'git restore -p --source=HEAD^' '
59+
test_expect_success 'git restore -p --source=HEAD^' '
6060
set_state dir/foo work index &&
6161
# the third n is to get out in case it mistakenly does not apply
6262
test_write_lines n y n | git restore -p --source=HEAD^ &&
6363
verify_saved_state bar &&
6464
verify_state dir/foo parent index
6565
'
6666

67-
test_expect_success PERL 'git restore -p --source=HEAD^...' '
67+
test_expect_success 'git restore -p --source=HEAD^...' '
6868
set_state dir/foo work index &&
6969
# the third n is to get out in case it mistakenly does not apply
7070
test_write_lines n y n | git restore -p --source=HEAD^... &&
7171
verify_saved_state bar &&
7272
verify_state dir/foo parent index
7373
'
7474

75-
test_expect_success PERL 'git restore -p handles deletion' '
75+
test_expect_success 'git restore -p handles deletion' '
7676
set_state dir/foo work index &&
7777
rm dir/foo &&
7878
test_write_lines n y | git restore -p &&
@@ -85,37 +85,37 @@ test_expect_success PERL 'git restore -p handles deletion' '
8585
# dir/foo. There's always an extra 'n' to reject edits to dir/foo in
8686
# the failure case (and thus get out of the loop).
8787

88-
test_expect_success PERL 'path limiting works: dir' '
88+
test_expect_success 'path limiting works: dir' '
8989
set_state dir/foo work head &&
9090
test_write_lines y n | git restore -p dir &&
9191
verify_saved_state bar &&
9292
verify_state dir/foo head head
9393
'
9494

95-
test_expect_success PERL 'path limiting works: -- dir' '
95+
test_expect_success 'path limiting works: -- dir' '
9696
set_state dir/foo work head &&
9797
test_write_lines y n | git restore -p -- dir &&
9898
verify_saved_state bar &&
9999
verify_state dir/foo head head
100100
'
101101

102-
test_expect_success PERL 'path limiting works: HEAD^ -- dir' '
102+
test_expect_success 'path limiting works: HEAD^ -- dir' '
103103
set_state dir/foo work head &&
104104
# the third n is to get out in case it mistakenly does not apply
105105
test_write_lines y n n | git restore -p --source=HEAD^ -- dir &&
106106
verify_saved_state bar &&
107107
verify_state dir/foo parent head
108108
'
109109

110-
test_expect_success PERL 'path limiting works: foo inside dir' '
110+
test_expect_success 'path limiting works: foo inside dir' '
111111
set_state dir/foo work head &&
112112
# the third n is to get out in case it mistakenly does not apply
113113
test_write_lines y n n | (cd dir && git restore -p foo) &&
114114
verify_saved_state bar &&
115115
verify_state dir/foo head head
116116
'
117117

118-
test_expect_success PERL 'none of this moved HEAD' '
118+
test_expect_success 'none of this moved HEAD' '
119119
verify_saved_head
120120
'
121121

t/t3904-stash-patch.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
test_description='stash -p'
44
. ./lib-patch-mode.sh
55

6-
if ! test_have_prereq PERL
7-
then
8-
skip_all='skipping stash -p tests, perl not available'
9-
test_done
10-
fi
11-
126
test_expect_success 'setup' '
137
mkdir dir &&
148
echo parent > dir/foo &&

t/t7105-reset-patch.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ test_description='git reset --patch'
55
TEST_PASSES_SANITIZE_LEAK=true
66
. ./lib-patch-mode.sh
77

8-
test_expect_success PERL 'setup' '
8+
test_expect_success 'setup' '
99
mkdir dir &&
1010
echo parent > dir/foo &&
1111
echo dummy > bar &&
@@ -19,7 +19,7 @@ test_expect_success PERL 'setup' '
1919

2020
# note: bar sorts before foo, so the first 'n' is always to skip 'bar'
2121

22-
test_expect_success PERL 'saying "n" does nothing' '
22+
test_expect_success 'saying "n" does nothing' '
2323
set_and_save_state dir/foo work work &&
2424
test_write_lines n n | git reset -p &&
2525
verify_saved_state dir/foo &&
@@ -28,7 +28,7 @@ test_expect_success PERL 'saying "n" does nothing' '
2828

2929
for opt in "HEAD" "@" ""
3030
do
31-
test_expect_success PERL "git reset -p $opt" '
31+
test_expect_success "git reset -p $opt" '
3232
set_and_save_state dir/foo work work &&
3333
test_write_lines n y | git reset -p $opt >output &&
3434
verify_state dir/foo work head &&
@@ -37,28 +37,28 @@ do
3737
'
3838
done
3939

40-
test_expect_success PERL 'git reset -p HEAD^' '
40+
test_expect_success 'git reset -p HEAD^' '
4141
test_write_lines n y | git reset -p HEAD^ >output &&
4242
verify_state dir/foo work parent &&
4343
verify_saved_state bar &&
4444
test_grep "Apply" output
4545
'
4646

47-
test_expect_success PERL 'git reset -p HEAD^^{tree}' '
47+
test_expect_success 'git reset -p HEAD^^{tree}' '
4848
test_write_lines n y | git reset -p HEAD^^{tree} >output &&
4949
verify_state dir/foo work parent &&
5050
verify_saved_state bar &&
5151
test_grep "Apply" output
5252
'
5353

54-
test_expect_success PERL 'git reset -p HEAD^:dir/foo (blob fails)' '
54+
test_expect_success 'git reset -p HEAD^:dir/foo (blob fails)' '
5555
set_and_save_state dir/foo work work &&
5656
test_must_fail git reset -p HEAD^:dir/foo &&
5757
verify_saved_state dir/foo &&
5858
verify_saved_state bar
5959
'
6060

61-
test_expect_success PERL 'git reset -p aaaaaaaa (unknown fails)' '
61+
test_expect_success 'git reset -p aaaaaaaa (unknown fails)' '
6262
set_and_save_state dir/foo work work &&
6363
test_must_fail git reset -p aaaaaaaa &&
6464
verify_saved_state dir/foo &&
@@ -70,27 +70,27 @@ test_expect_success PERL 'git reset -p aaaaaaaa (unknown fails)' '
7070
# dir/foo. There's always an extra 'n' to reject edits to dir/foo in
7171
# the failure case (and thus get out of the loop).
7272

73-
test_expect_success PERL 'git reset -p dir' '
73+
test_expect_success 'git reset -p dir' '
7474
set_state dir/foo work work &&
7575
test_write_lines y n | git reset -p dir &&
7676
verify_state dir/foo work head &&
7777
verify_saved_state bar
7878
'
7979

80-
test_expect_success PERL 'git reset -p -- foo (inside dir)' '
80+
test_expect_success 'git reset -p -- foo (inside dir)' '
8181
set_state dir/foo work work &&
8282
test_write_lines y n | (cd dir && git reset -p -- foo) &&
8383
verify_state dir/foo work head &&
8484
verify_saved_state bar
8585
'
8686

87-
test_expect_success PERL 'git reset -p HEAD^ -- dir' '
87+
test_expect_success 'git reset -p HEAD^ -- dir' '
8888
test_write_lines y n | git reset -p HEAD^ -- dir &&
8989
verify_state dir/foo work parent &&
9090
verify_saved_state bar
9191
'
9292

93-
test_expect_success PERL 'none of this moved HEAD' '
93+
test_expect_success 'none of this moved HEAD' '
9494
verify_saved_head
9595
'
9696

t/t7106-reset-unborn-branch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ test_expect_success 'reset $file' '
3434
test_cmp expect actual
3535
'
3636

37-
test_expect_success PERL 'reset -p' '
37+
test_expect_success 'reset -p' '
3838
rm .git/index &&
3939
git add a &&
4040
echo y >yes &&

t/t7514-commit-patch.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
test_description='hunk edit with "commit -p -m"'
44
. ./test-lib.sh
55

6-
if ! test_have_prereq PERL
7-
then
8-
skip_all="skipping '$test_description' tests, perl not available"
9-
test_done
10-
fi
11-
126
test_expect_success 'setup (initial)' '
137
echo line1 >file &&
148
git add file &&

0 commit comments

Comments
 (0)