Skip to content

Commit 630c4f1

Browse files
Pete Wyckoffgitster
authored andcommitted
git p4 test: explicitly check p4 wildcard delete
There was no test where p4 deleted a file with a wildcard character. Make sure git p4 applies the wildcard decoding properly when importing a delete that includes a wildcard. Signed-off-by: Pete Wyckoff <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 40f846c commit 630c4f1

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

t/t9812-git-p4-wildcards.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,33 @@ test_expect_success 'wildcard files submit back to p4, delete' '
161161
)
162162
'
163163

164+
test_expect_success 'p4 deleted a wildcard file' '
165+
(
166+
cd "$cli" &&
167+
echo "wild delete test" >wild@delete &&
168+
p4 add -f wild@delete &&
169+
p4 submit -d "add wild@delete"
170+
) &&
171+
test_when_finished cleanup_git &&
172+
git p4 clone --dest="$git" //depot &&
173+
(
174+
cd "$git" &&
175+
test_path_is_file wild@delete
176+
) &&
177+
(
178+
cd "$cli" &&
179+
# must use its encoded name
180+
p4 delete wild%40delete &&
181+
p4 submit -d "delete wild@delete"
182+
) &&
183+
(
184+
cd "$git" &&
185+
git p4 sync &&
186+
git merge --ff-only p4/master &&
187+
test_path_is_missing wild@delete
188+
)
189+
'
190+
164191
test_expect_success 'kill p4d' '
165192
kill_p4d
166193
'

0 commit comments

Comments
 (0)