git p4: use "git p4" directly in tests

Drop the $GITP4 variable that was used to specify the script in contrib/fast-import/. The command is called "git p4" now, not "git-p4". Note that configuration variables will remain in a section called "git-p4". Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Pete Wyckoff committed Apr 8, 2012 at 20:18 UTC 6ab1d76c3cf96aac77a75565dfaa0cf64aa100a1
12 files changed +182 -184
t/lib-git-p4.sh
+3 -5
@@ -1,20 +1,18 @@
1 #
2 -# Library code for git-p4 tests
2 +# Library code for git p4 tests
3 #
4
5 . ./test-lib.sh
6
7 if ! test_have_prereq PYTHON; then
8 - skip_all='skipping git-p4 tests; python not available'
8 + skip_all='skipping git p4 tests; python not available'
9 test_done
10 fi
11 ( p4 -h && p4d -h ) >/dev/null 2>&1 || {
12 - skip_all='skipping git-p4 tests; no p4 or p4d'
12 + skip_all='skipping git p4 tests; no p4 or p4d'
13 test_done
14 }
15
16 -GITP4="$GIT_BUILD_DIR/git-p4"
17 -
16 # Try to pick a unique port: guess a large number, then hope
17 # no more than one of each test is running.
18 #
t/t9800-git-p4-basic.sh
+42 -42
@@ -1,6 +1,6 @@
1 #!/bin/sh
2
3 -test_description='git-p4 tests'
3 +test_description='git p4 tests'
4
5 . ./lib-git-p4.sh
6
@@ -20,8 +20,8 @@ test_expect_success 'add p4 files' '
20 )
21 '
22
23 -test_expect_success 'basic git-p4 clone' '
24 - "$GITP4" clone --dest="$git" //depot &&
23 +test_expect_success 'basic git p4 clone' '
24 + git p4 clone --dest="$git" //depot &&
25 test_when_finished cleanup_git &&
26 (
27 cd "$git" &&
@@ -30,8 +30,8 @@ test_expect_success 'basic git-p4 clone' '
30 )
31 '
32
33 -test_expect_success 'git-p4 clone @all' '
34 - "$GITP4" clone --dest="$git" //depot@all &&
33 +test_expect_success 'git p4 clone @all' '
34 + git p4 clone --dest="$git" //depot@all &&
35 test_when_finished cleanup_git &&
36 (
37 cd "$git" &&
@@ -40,12 +40,12 @@ test_expect_success 'git-p4 clone @all' '
40 )
41 '
42
43 -test_expect_success 'git-p4 sync uninitialized repo' '
43 +test_expect_success 'git p4 sync uninitialized repo' '
44 test_create_repo "$git" &&
45 test_when_finished cleanup_git &&
46 (
47 cd "$git" &&
48 - test_must_fail "$GITP4" sync
48 + test_must_fail git p4 sync
49 )
50 '
51
@@ -53,13 +53,13 @@ test_expect_success 'git-p4 sync uninitialized repo' '
53 # Create a git repo by hand. Add a commit so that HEAD is valid.
54 # Test imports a new p4 repository into a new git branch.
55 #
56 -test_expect_success 'git-p4 sync new branch' '
56 +test_expect_success 'git p4 sync new branch' '
57 test_create_repo "$git" &&
58 test_when_finished cleanup_git &&
59 (
60 cd "$git" &&
61 test_commit head &&
62 - "$GITP4" sync --branch=refs/remotes/p4/depot //depot@all &&
62 + git p4 sync --branch=refs/remotes/p4/depot //depot@all &&
63 git log --oneline p4/depot >lines &&
64 test_line_count = 2 lines
65 )
@@ -76,7 +76,7 @@ test_expect_success 'clone two dirs' '
76 p4 add sub2/f2 &&
77 p4 submit -d "sub2/f2"
78 ) &&
79 - "$GITP4" clone --dest="$git" //depot/sub1 //depot/sub2 &&
79 + git p4 clone --dest="$git" //depot/sub1 //depot/sub2 &&
80 test_when_finished cleanup_git &&
81 (
82 cd "$git" &&
@@ -94,7 +94,7 @@ test_expect_success 'clone two dirs, @all' '
94 p4 add sub1/f3 &&
95 p4 submit -d "sub1/f3"
96 ) &&
97 - "$GITP4" clone --dest="$git" //depot/sub1@all //depot/sub2@all &&
97 + git p4 clone --dest="$git" //depot/sub1@all //depot/sub2@all &&
98 test_when_finished cleanup_git &&
99 (
100 cd "$git" &&
@@ -112,7 +112,7 @@ test_expect_success 'clone two dirs, @all, conflicting files' '
112 p4 add sub2/f3 &&
113 p4 submit -d "sub2/f3"
114 ) &&
115 - "$GITP4" clone --dest="$git" //depot/sub1@all //depot/sub2@all &&
115 + git p4 clone --dest="$git" //depot/sub1@all //depot/sub2@all &&
116 test_when_finished cleanup_git &&
117 (
118 cd "$git" &&
@@ -134,7 +134,7 @@ test_expect_success 'exit when p4 fails to produce marshaled output' '
134 exit 1
135 EOF
136 chmod 755 "$badp4dir"/p4 &&
137 - PATH="$badp4dir:$PATH" "$GITP4" clone --dest="$git" //depot >errs 2>&1 ; retval=$? &&
137 + PATH="$badp4dir:$PATH" git p4 clone --dest="$git" //depot >errs 2>&1 ; retval=$? &&
138 test $retval -eq 1 &&
139 test_must_fail grep -q Traceback errs
140 '
@@ -151,8 +151,8 @@ test_expect_success 'add p4 files with wildcards in the names' '
151 )
152 '
153
154 -test_expect_success 'wildcard files git-p4 clone' '
155 - "$GITP4" clone --dest="$git" //depot &&
154 +test_expect_success 'wildcard files git p4 clone' '
155 + git p4 clone --dest="$git" //depot &&
156 test_when_finished cleanup_git &&
157 (
158 cd "$git" &&
@@ -164,7 +164,7 @@ test_expect_success 'wildcard files git-p4 clone' '
164 '
165
166 test_expect_success 'clone bare' '
167 - "$GITP4" clone --dest="$git" --bare //depot &&
167 + git p4 clone --dest="$git" --bare //depot &&
168 test_when_finished cleanup_git &&
169 (
170 cd "$git" &&
@@ -209,7 +209,7 @@ test_expect_success 'preserve users' '
209 p4_add_user alice Alice &&
210 p4_add_user bob Bob &&
211 p4_grant_admin alice &&
212 - "$GITP4" clone --dest="$git" //depot &&
212 + git p4 clone --dest="$git" //depot &&
213 test_when_finished cleanup_git &&
214 (
215 cd "$git" &&
@@ -218,7 +218,7 @@ test_expect_success 'preserve users' '
218 git commit --author "Alice <alice@localhost>" -m "a change by alice" file1 &&
219 git commit --author "Bob <bob@localhost>" -m "a change by bob" file2 &&
220 git config git-p4.skipSubmitEditCheck true &&
221 - P4EDITOR=touch P4USER=alice P4PASSWD=secret "$GITP4" commit --preserve-user &&
221 + P4EDITOR=touch P4USER=alice P4PASSWD=secret git p4 commit --preserve-user &&
222 p4_check_commit_author file1 alice &&
223 p4_check_commit_author file2 bob
224 )
@@ -227,7 +227,7 @@ test_expect_success 'preserve users' '
227 # Test username support, submitting as bob, who lacks admin rights. Should
228 # not submit change to p4 (git diff should show deltas).
229 test_expect_success 'refuse to preserve users without perms' '
230 - "$GITP4" clone --dest="$git" //depot &&
230 + git p4 clone --dest="$git" //depot &&
231 test_when_finished cleanup_git &&
232 (
233 cd "$git" &&
@@ -236,14 +236,14 @@ test_expect_success 'refuse to preserve users without perms' '
236 git commit --author "Alice <alice@localhost>" -m "perms: a change by alice" file1 &&
237 P4EDITOR=touch P4USER=bob P4PASSWD=secret &&
238 export P4EDITOR P4USER P4PASSWD &&
239 - test_must_fail "$GITP4" commit --preserve-user &&
239 + test_must_fail git p4 commit --preserve-user &&
240 ! git diff --exit-code HEAD..p4/master
241 )
242 '
243
244 # What happens with unknown author? Without allowMissingP4Users it should fail.
245 test_expect_success 'preserve user where author is unknown to p4' '
246 - "$GITP4" clone --dest="$git" //depot &&
246 + git p4 clone --dest="$git" //depot &&
247 test_when_finished cleanup_git &&
248 (
249 cd "$git" &&
@@ -254,24 +254,24 @@ test_expect_success 'preserve user where author is unknown to p4' '
254 git commit --author "Charlie <charlie@localhost>" -m "preserve: a change by charlie" file1 &&
255 P4EDITOR=touch P4USER=alice P4PASSWD=secret &&
256 export P4EDITOR P4USER P4PASSWD &&
257 - test_must_fail "$GITP4" commit --preserve-user &&
257 + test_must_fail git p4 commit --preserve-user &&
258 ! git diff --exit-code HEAD..p4/master &&
259
260 echo "$0: repeat with allowMissingP4Users enabled" &&
261 git config git-p4.allowMissingP4Users true &&
262 git config git-p4.preserveUser true &&
263 - "$GITP4" commit &&
263 + git p4 commit &&
264 git diff --exit-code HEAD..p4/master &&
265 p4_check_commit_author file1 alice
266 )
267 '
268
269 -# If we're *not* using --preserve-user, git-p4 should warn if we're submitting
269 +# If we're *not* using --preserve-user, git p4 should warn if we're submitting
270 # changes that are not all ours.
271 # Test: user in p4 and user unknown to p4.
272 # Test: warning disabled and user is the same.
273 test_expect_success 'not preserving user with mixed authorship' '
274 - "$GITP4" clone --dest="$git" //depot &&
274 + git p4 clone --dest="$git" //depot &&
275 test_when_finished cleanup_git &&
276 (
277 cd "$git" &&
@@ -281,20 +281,20 @@ test_expect_success 'not preserving user with mixed authorship' '
281 make_change_by_user usernamefile3 Derek derek@localhost &&
282 P4EDITOR=cat P4USER=alice P4PASSWD=secret &&
283 export P4EDITOR P4USER P4PASSWD &&
284 - "$GITP4" commit |\
284 + git p4 commit |\
285 grep "git author derek@localhost does not match" &&
286
287 make_change_by_user usernamefile3 Charlie charlie@localhost &&
288 - "$GITP4" commit |\
288 + git p4 commit |\
289 grep "git author charlie@localhost does not match" &&
290
291 make_change_by_user usernamefile3 alice alice@localhost &&
292 - "$GITP4" commit |\
292 + git p4 commit |\
293 test_must_fail grep "git author.*does not match" &&
294
295 git config git-p4.skipUserNameCheck true &&
296 make_change_by_user usernamefile3 Charlie charlie@localhost &&
297 - "$GITP4" commit |\
297 + git p4 commit |\
298 test_must_fail grep "git author.*does not match" &&
299
300 p4_check_commit_author usernamefile3 alice
@@ -313,7 +313,7 @@ test_expect_success 'initial import time from top change time' '
313 p4change=$(p4 -G changes -m 1 //depot/... | marshal_dump change) &&
314 p4time=$(p4 -G changes -m 1 //depot/... | marshal_dump time) &&
315 sleep 3 &&
316 - "$GITP4" clone --dest="$git" //depot &&
316 + git p4 clone --dest="$git" //depot &&
317 test_when_finished cleanup_git &&
318 (
319 cd "$git" &&
@@ -331,7 +331,7 @@ test_expect_success 'initial import time from top change time' '
331 # Repeat, this time with a smaller threshold and confirm that the rename is
332 # detected in P4.
333 test_expect_success 'detect renames' '
334 - "$GITP4" clone --dest="$git" //depot@all &&
334 + git p4 clone --dest="$git" //depot@all &&
335 test_when_finished cleanup_git &&
336 (
337 cd "$git" &&
@@ -340,7 +340,7 @@ test_expect_success 'detect renames' '
340 git mv file1 file4 &&
341 git commit -a -m "Rename file1 to file4" &&
342 git diff-tree -r -M HEAD &&
343 - "$GITP4" submit &&
343 + git p4 submit &&
344 p4 filelog //depot/file4 &&
345 p4 filelog //depot/file4 | test_must_fail grep -q "branch from" &&
346
@@ -348,7 +348,7 @@ test_expect_success 'detect renames' '
348 git commit -a -m "Rename file4 to file5" &&
349 git diff-tree -r -M HEAD &&
350 git config git-p4.detectRenames true &&
351 - "$GITP4" submit &&
351 + git p4 submit &&
352 p4 filelog //depot/file5 &&
353 p4 filelog //depot/file5 | grep -q "branch from //depot/file4" &&
354
@@ -360,7 +360,7 @@ test_expect_success 'detect renames' '
360 level=$(git diff-tree -r -M HEAD | sed 1d | cut -f1 | cut -d" " -f5 | sed "s/R0*//") &&
361 test -n "$level" && test "$level" -gt 0 && test "$level" -lt 98 &&
362 git config git-p4.detectRenames $(($level + 2)) &&
363 - "$GITP4" submit &&
363 + git p4 submit &&
364 p4 filelog //depot/file6 &&
365 p4 filelog //depot/file6 | test_must_fail grep -q "branch from" &&
366
@@ -372,7 +372,7 @@ test_expect_success 'detect renames' '
372 level=$(git diff-tree -r -M HEAD | sed 1d | cut -f1 | cut -d" " -f5 | sed "s/R0*//") &&
373 test -n "$level" && test "$level" -gt 2 && test "$level" -lt 100 &&
374 git config git-p4.detectRenames $(($level - 2)) &&
375 - "$GITP4" submit &&
375 + git p4 submit &&
376 p4 filelog //depot/file7 &&
377 p4 filelog //depot/file7 | grep -q "branch from //depot/file6"
378 )
@@ -390,7 +390,7 @@ test_expect_success 'detect renames' '
390 # Modify and copy a file, configure a smaller threshold in detectCopies and
391 # confirm that copy is detected in P4.
392 test_expect_success 'detect copies' '
393 - "$GITP4" clone --dest="$git" //depot@all &&
393 + git p4 clone --dest="$git" //depot@all &&
394 test_when_finished cleanup_git &&
395 (
396 cd "$git" &&
@@ -400,7 +400,7 @@ test_expect_success 'detect copies' '
400 git add file8 &&
401 git commit -a -m "Copy file2 to file8" &&
402 git diff-tree -r -C HEAD &&
403 - "$GITP4" submit &&
403 + git p4 submit &&
404 p4 filelog //depot/file8 &&
405 p4 filelog //depot/file8 | test_must_fail grep -q "branch from" &&
406
@@ -409,7 +409,7 @@ test_expect_success 'detect copies' '
409 git commit -a -m "Copy file2 to file9" &&
410 git diff-tree -r -C HEAD &&
411 git config git-p4.detectCopies true &&
412 - "$GITP4" submit &&
412 + git p4 submit &&
413 p4 filelog //depot/file9 &&
414 p4 filelog //depot/file9 | test_must_fail grep -q "branch from" &&
415
@@ -418,7 +418,7 @@ test_expect_success 'detect copies' '
418 git add file2 file10 &&
419 git commit -a -m "Modify and copy file2 to file10" &&
420 git diff-tree -r -C HEAD &&
421 - "$GITP4" submit &&
421 + git p4 submit &&
422 p4 filelog //depot/file10 &&
423 p4 filelog //depot/file10 | grep -q "branch from //depot/file" &&
424
@@ -429,7 +429,7 @@ test_expect_success 'detect copies' '
429 src=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f2) &&
430 test "$src" = file10 &&
431 git config git-p4.detectCopiesHarder true &&
432 - "$GITP4" submit &&
432 + git p4 submit &&
433 p4 filelog //depot/file11 &&
434 p4 filelog //depot/file11 | grep -q "branch from //depot/file" &&
435
@@ -443,7 +443,7 @@ test_expect_success 'detect copies' '
443 src=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f2) &&
444 test "$src" = file10 &&
445 git config git-p4.detectCopies $(($level + 2)) &&
446 - "$GITP4" submit &&
446 + git p4 submit &&
447 p4 filelog //depot/file12 &&
448 p4 filelog //depot/file12 | test_must_fail grep -q "branch from" &&
449
@@ -457,7 +457,7 @@ test_expect_success 'detect copies' '
457 src=$(git diff-tree -r -C --find-copies-harder HEAD | sed 1d | cut -f2) &&
458 test "$src" = file10 &&
459 git config git-p4.detectCopies $(($level - 2)) &&
460 - "$GITP4" submit &&
460 + git p4 submit &&
461 p4 filelog //depot/file13 &&
462 p4 filelog //depot/file13 | grep -q "branch from //depot/file"
463 )
t/t9801-git-p4-branch.sh
+16 -16
@@ -1,6 +1,6 @@
1 #!/bin/sh
2
3 -test_description='git-p4 p4 branching tests'
3 +test_description='git p4 tests for p4 branches'
4
5 . ./lib-git-p4.sh
6
@@ -63,7 +63,7 @@ test_expect_success 'basic p4 branches' '
63
64 test_expect_success 'import main, no branch detection' '
65 test_when_finished cleanup_git &&
66 - "$GITP4" clone --dest="$git" //depot/main@all &&
66 + git p4 clone --dest="$git" //depot/main@all &&
67 (
68 cd "$git" &&
69 git log --oneline --graph --decorate --all &&
@@ -74,7 +74,7 @@ test_expect_success 'import main, no branch detection' '
74
75 test_expect_success 'import branch1, no branch detection' '
76 test_when_finished cleanup_git &&
77 - "$GITP4" clone --dest="$git" //depot/branch1@all &&
77 + git p4 clone --dest="$git" //depot/branch1@all &&
78 (
79 cd "$git" &&
80 git log --oneline --graph --decorate --all &&
@@ -85,7 +85,7 @@ test_expect_success 'import branch1, no branch detection' '
85
86 test_expect_success 'import branch2, no branch detection' '
87 test_when_finished cleanup_git &&
88 - "$GITP4" clone --dest="$git" //depot/branch2@all &&
88 + git p4 clone --dest="$git" //depot/branch2@all &&
89 (
90 cd "$git" &&
91 git log --oneline --graph --decorate --all &&
@@ -96,7 +96,7 @@ test_expect_success 'import branch2, no branch detection' '
96
97 test_expect_success 'import depot, no branch detection' '
98 test_when_finished cleanup_git &&
99 - "$GITP4" clone --dest="$git" //depot@all &&
99 + git p4 clone --dest="$git" //depot@all &&
100 (
101 cd "$git" &&
102 git log --oneline --graph --decorate --all &&
@@ -107,7 +107,7 @@ test_expect_success 'import depot, no branch detection' '
107
108 test_expect_success 'import depot, branch detection' '
109 test_when_finished cleanup_git &&
110 - "$GITP4" clone --dest="$git" --detect-branches //depot@all &&
110 + git p4 clone --dest="$git" --detect-branches //depot@all &&
111 (
112 cd "$git" &&
113
@@ -132,7 +132,7 @@ test_expect_success 'import depot, branch detection, branchList branch definitio
132 (
133 cd "$git" &&
134 git config git-p4.branchList main:branch1 &&
135 - "$GITP4" clone --dest=. --detect-branches //depot@all &&
135 + git p4 clone --dest=. --detect-branches //depot@all &&
136
137 git log --oneline --graph --decorate --all &&
138
@@ -189,15 +189,15 @@ test_expect_success 'add simple p4 branches' '
189 # Configure branches through git-config and clone them.
190 # All files are tested to make sure branches were cloned correctly.
191 # Finally, make an update to branch1 on P4 side to check if it is imported
192 -# correctly by git-p4.
193 -test_expect_success 'git-p4 clone simple branches' '
192 +# correctly by git p4.
193 +test_expect_success 'git p4 clone simple branches' '
194 test_when_finished cleanup_git &&
195 test_create_repo "$git" &&
196 (
197 cd "$git" &&
198 git config git-p4.branchList branch1:branch2 &&
199 git config --add git-p4.branchList branch1:branch3 &&
200 - "$GITP4" clone --dest=. --detect-branches //depot@all &&
200 + git p4 clone --dest=. --detect-branches //depot@all &&
201 git log --all --graph --decorate --stat &&
202 git reset --hard p4/depot/branch1 &&
203 test -f file1 &&
@@ -221,13 +221,13 @@ test_expect_success 'git-p4 clone simple branches' '
221 p4 submit -d "update file2 in branch3" &&
222 cd "$git" &&
223 git reset --hard p4/depot/branch1 &&
224 - "$GITP4" rebase &&
224 + git p4 rebase &&
225 grep file2_ file2
226 )
227 '
228
229 # Create a complex branch structure in P4 depot to check if they are correctly
230 -# cloned. The branches are created from older changelists to check if git-p4 is
230 +# cloned. The branches are created from older changelists to check if git p4 is
231 # able to correctly detect them.
232 # The final expected structure is:
233 # `branch1
@@ -248,7 +248,7 @@ test_expect_success 'git-p4 clone simple branches' '
248 # `- file1
249 # `- file2
250 # `- file3
251 -test_expect_success 'git-p4 add complex branches' '
251 +test_expect_success 'git p4 add complex branches' '
252 test_when_finished cleanup_git &&
253 test_create_repo "$git" &&
254 (
@@ -263,10 +263,10 @@ test_expect_success 'git-p4 add complex branches' '
263 )
264 '
265
266 -# Configure branches through git-config and clone them. git-p4 will only be able
266 +# Configure branches through git-config and clone them. git p4 will only be able
267 # to clone the original structure if it is able to detect the origin changelist
268 # of each branch.
269 -test_expect_success 'git-p4 clone complex branches' '
269 +test_expect_success 'git p4 clone complex branches' '
270 test_when_finished cleanup_git &&
271 test_create_repo "$git" &&
272 (
@@ -275,7 +275,7 @@ test_expect_success 'git-p4 clone complex branches' '
275 git config --add git-p4.branchList branch1:branch3 &&
276 git config --add git-p4.branchList branch1:branch4 &&
277 git config --add git-p4.branchList branch1:branch5 &&
278 - "$GITP4" clone --dest=. --detect-branches //depot@all &&
278 + git p4 clone --dest=. --detect-branches //depot@all &&
279 git log --all --graph --decorate --stat &&
280 git reset --hard p4/depot/branch1 &&
281 test_path_is_file file1 &&
t/t9802-git-p4-filetype.sh
+5 -5
@@ -1,6 +1,6 @@
1 #!/bin/sh
2
3 -test_description='git-p4 p4 filetype tests'
3 +test_description='git p4 filetype tests'
4
5 . ./lib-git-p4.sh
6
@@ -37,7 +37,7 @@ test_expect_success 'utf-16 file create' '
37
38 test_expect_success 'utf-16 file test' '
39 test_when_finished cleanup_git &&
40 - "$GITP4" clone --dest="$git" //depot@all &&
40 + git p4 clone --dest="$git" //depot@all &&
41 (
42 cd "$git" &&
43
@@ -84,7 +84,7 @@ test_expect_success 'keyword file test' '
84 build_smush &&
85 test_when_finished rm -f k_smush.py ko_smush.py &&
86 test_when_finished cleanup_git &&
87 - "$GITP4" clone --dest="$git" //depot@all &&
87 + git p4 clone --dest="$git" //depot@all &&
88 (
89 cd "$git" &&
90
@@ -94,7 +94,7 @@ test_expect_success 'keyword file test' '
94 "$PYTHON_PATH" "$TRASH_DIRECTORY/ko_smush.py" <"$cli/k-text-ko" >cli-k-text-ko-smush &&
95 test_cmp cli-k-text-ko-smush k-text-ko &&
96
97 - # utf16, even though p4 expands keywords, git-p4 does not
97 + # utf16, even though p4 expands keywords, git p4 does not
98 # try to undo that
99 test_cmp "$cli/k-utf16-k" k-utf16-k &&
100 test_cmp "$cli/k-utf16-ko" k-utf16-ko
@@ -125,7 +125,7 @@ test_expect_success 'ignore apple' '
125 p4 submit -d appledouble
126 ) &&
127 test_when_finished cleanup_git &&
128 - "$GITP4" clone --dest="$git" //depot@all &&
128 + git p4 clone --dest="$git" //depot@all &&
129 (
130 cd "$git" &&
131 test ! -f double.png
t/t9803-git-p4-shell-metachars.sh
+6 -6
@@ -1,6 +1,6 @@
1 #!/bin/sh
2
3 -test_description='git-p4 transparency to shell metachars in filenames'
3 +test_description='git p4 transparency to shell metachars in filenames'
4
5 . ./lib-git-p4.sh
6
@@ -18,7 +18,7 @@ test_expect_success 'init depot' '
18 '
19
20 test_expect_success 'shell metachars in filenames' '
21 - "$GITP4" clone --dest="$git" //depot &&
21 + git p4 clone --dest="$git" //depot &&
22 test_when_finished cleanup_git &&
23 (
24 cd "$git" &&
@@ -28,7 +28,7 @@ test_expect_success 'shell metachars in filenames' '
28 echo f2 >"file with spaces" &&
29 git add "file with spaces" &&
30 git commit -m "add files" &&
31 - P4EDITOR=touch "$GITP4" submit
31 + P4EDITOR=touch git p4 submit
32 ) &&
33 (
34 cd "$cli" &&
@@ -39,7 +39,7 @@ test_expect_success 'shell metachars in filenames' '
39 '
40
41 test_expect_success 'deleting with shell metachars' '
42 - "$GITP4" clone --dest="$git" //depot &&
42 + git p4 clone --dest="$git" //depot &&
43 test_when_finished cleanup_git &&
44 (
45 cd "$git" &&
@@ -47,7 +47,7 @@ test_expect_success 'deleting with shell metachars' '
47 git rm foo\$bar &&
48 git rm file\ with\ spaces &&
49 git commit -m "remove files" &&
50 - P4EDITOR=touch "$GITP4" submit
50 + P4EDITOR=touch git p4 submit
51 ) &&
52 (
53 cd "$cli" &&
@@ -97,7 +97,7 @@ test_expect_success 'branch with shell char' '
97 cd "$git" &&
98
99 git config git-p4.branchList main:branch\$3 &&
100 - "$GITP4" clone --dest=. --detect-branches //depot@all &&
100 + git p4 clone --dest=. --detect-branches //depot@all &&
101 git log --all --graph --decorate --stat &&
102 git reset --hard p4/depot/branch\$3 &&
103 test -f shell_char_branch_file &&
t/t9804-git-p4-label.sh
+3 -3
@@ -1,6 +1,6 @@
1 #!/bin/sh
2
3 -test_description='git-p4 p4 label tests'
3 +test_description='git p4 label tests'
4
5 . ./lib-git-p4.sh
6
@@ -50,7 +50,7 @@ test_expect_success 'basic p4 labels' '
50
51 p4 labels ... &&
52
53 - "$GITP4" clone --dest="$git" --detect-labels //depot@all &&
53 + git p4 clone --dest="$git" --detect-labels //depot@all &&
54 cd "$git" &&
55
56 git tag &&
@@ -89,7 +89,7 @@ test_expect_failure 'two labels on the same changelist' '
89
90 p4 labels ... &&
91
92 - "$GITP4" clone --dest="$git" --detect-labels //depot@all &&
92 + git p4 clone --dest="$git" --detect-labels //depot@all &&
93 cd "$git" &&
94
95 git tag | grep tag_f1 &&
t/t9805-git-p4-skip-submit-edit.sh
+11 -11
@@ -1,6 +1,6 @@
1 #!/bin/sh
2
3 -test_description='git-p4 skipSubmitEdit config variables'
3 +test_description='git p4 skipSubmitEdit config variables'
4
5 . ./lib-git-p4.sh
6
@@ -19,33 +19,33 @@ test_expect_success 'init depot' '
19
20 # this works because EDITOR is set to :
21 test_expect_success 'no config, unedited, say yes' '
22 - "$GITP4" clone --dest="$git" //depot &&
22 + git p4 clone --dest="$git" //depot &&
23 test_when_finished cleanup_git &&
24 (
25 cd "$git" &&
26 echo line >>file1 &&
27 git commit -a -m "change 2" &&
28 - echo y | "$GITP4" submit &&
28 + echo y | git p4 submit &&
29 p4 changes //depot/... >wc &&
30 test_line_count = 2 wc
31 )
32 '
33
34 test_expect_success 'no config, unedited, say no' '
35 - "$GITP4" clone --dest="$git" //depot &&
35 + git p4 clone --dest="$git" //depot &&
36 test_when_finished cleanup_git &&
37 (
38 cd "$git" &&
39 echo line >>file1 &&
40 git commit -a -m "change 3 (not really)" &&
41 - printf "bad response\nn\n" | "$GITP4" submit &&
41 + printf "bad response\nn\n" | git p4 submit &&
42 p4 changes //depot/... >wc &&
43 test_line_count = 2 wc
44 )
45 '
46
47 test_expect_success 'skipSubmitEdit' '
48 - "$GITP4" clone --dest="$git" //depot &&
48 + git p4 clone --dest="$git" //depot &&
49 test_when_finished cleanup_git &&
50 (
51 cd "$git" &&
@@ -54,21 +54,21 @@ test_expect_success 'skipSubmitEdit' '
54 git config core.editor /bin/false &&
55 echo line >>file1 &&
56 git commit -a -m "change 3" &&
57 - "$GITP4" submit &&
57 + git p4 submit &&
58 p4 changes //depot/... >wc &&
59 test_line_count = 3 wc
60 )
61 '
62
63 test_expect_success 'skipSubmitEditCheck' '
64 - "$GITP4" clone --dest="$git" //depot &&
64 + git p4 clone --dest="$git" //depot &&
65 test_when_finished cleanup_git &&
66 (
67 cd "$git" &&
68 git config git-p4.skipSubmitEditCheck true &&
69 echo line >>file1 &&
70 git commit -a -m "change 4" &&
71 - "$GITP4" submit &&
71 + git p4 submit &&
72 p4 changes //depot/... >wc &&
73 test_line_count = 4 wc
74 )
@@ -76,7 +76,7 @@ test_expect_success 'skipSubmitEditCheck' '
76
77 # check the normal case, where the template really is edited
78 test_expect_success 'no config, edited' '
79 - "$GITP4" clone --dest="$git" //depot &&
79 + git p4 clone --dest="$git" //depot &&
80 test_when_finished cleanup_git &&
81 ed="$TRASH_DIRECTORY/ed.sh" &&
82 test_when_finished "rm \"$ed\"" &&
@@ -91,7 +91,7 @@ test_expect_success 'no config, edited' '
91 cd "$git" &&
92 echo line >>file1 &&
93 git commit -a -m "change 5" &&
94 - EDITOR="\"$ed\"" "$GITP4" submit &&
94 + EDITOR="\"$ed\"" git p4 submit &&
95 p4 changes //depot/... >wc &&
96 test_line_count = 5 wc
97 )
t/t9806-git-p4-options.sh
+14 -14
@@ -1,6 +1,6 @@
1 #!/bin/sh
2
3 -test_description='git-p4 options'
3 +test_description='git p4 options'
4
5 . ./lib-git-p4.sh
6
@@ -24,11 +24,11 @@ test_expect_success 'init depot' '
24 '
25
26 test_expect_success 'clone no --git-dir' '
27 - test_must_fail "$GITP4" clone --git-dir=xx //depot
27 + test_must_fail git p4 clone --git-dir=xx //depot
28 '
29
30 test_expect_success 'clone --branch' '
31 - "$GITP4" clone --branch=refs/remotes/p4/sb --dest="$git" //depot &&
31 + git p4 clone --branch=refs/remotes/p4/sb --dest="$git" //depot &&
32 test_when_finished cleanup_git &&
33 (
34 cd "$git" &&
@@ -42,7 +42,7 @@ test_expect_success 'clone --changesfile' '
42 cf="$TRASH_DIRECTORY/cf" &&
43 test_when_finished "rm \"$cf\"" &&
44 printf "1\n3\n" >"$cf" &&
45 - "$GITP4" clone --changesfile="$cf" --dest="$git" //depot &&
45 + git p4 clone --changesfile="$cf" --dest="$git" //depot &&
46 test_when_finished cleanup_git &&
47 (
48 cd "$git" &&
@@ -58,14 +58,14 @@ test_expect_success 'clone --changesfile, @all' '
58 cf="$TRASH_DIRECTORY/cf" &&
59 test_when_finished "rm \"$cf\"" &&
60 printf "1\n3\n" >"$cf" &&
61 - test_must_fail "$GITP4" clone --changesfile="$cf" --dest="$git" //depot@all
61 + test_must_fail git p4 clone --changesfile="$cf" --dest="$git" //depot@all
62 '
63
64 # imports both master and p4/master in refs/heads
65 # requires --import-local on sync to find p4 refs/heads
66 # does not update master on sync, just p4/master
67 test_expect_success 'clone/sync --import-local' '
68 - "$GITP4" clone --import-local --dest="$git" //depot@1,2 &&
68 + git p4 clone --import-local --dest="$git" //depot@1,2 &&
69 test_when_finished cleanup_git &&
70 (
71 cd "$git" &&
@@ -73,9 +73,9 @@ test_expect_success 'clone/sync --import-local' '
73 test_line_count = 2 lines &&
74 git log --oneline refs/heads/p4/master >lines &&
75 test_line_count = 2 lines &&
76 - test_must_fail "$GITP4" sync &&
76 + test_must_fail git p4 sync &&
77
78 - "$GITP4" sync --import-local &&
78 + git p4 sync --import-local &&
79 git log --oneline refs/heads/master >lines &&
80 test_line_count = 2 lines &&
81 git log --oneline refs/heads/p4/master >lines &&
@@ -84,7 +84,7 @@ test_expect_success 'clone/sync --import-local' '
84 '
85
86 test_expect_success 'clone --max-changes' '
87 - "$GITP4" clone --dest="$git" --max-changes 2 //depot@all &&
87 + git p4 clone --dest="$git" --max-changes 2 //depot@all &&
88 test_when_finished cleanup_git &&
89 (
90 cd "$git" &&
@@ -101,7 +101,7 @@ test_expect_success 'clone --keep-path' '
101 p4 add sub/dir/f4 &&
102 p4 submit -d "change 4"
103 ) &&
104 - "$GITP4" clone --dest="$git" --keep-path //depot/sub/dir@all &&
104 + git p4 clone --dest="$git" --keep-path //depot/sub/dir@all &&
105 test_when_finished cleanup_git &&
106 (
107 cd "$git" &&
@@ -109,7 +109,7 @@ test_expect_success 'clone --keep-path' '
109 test_path_is_file sub/dir/f4
110 ) &&
111 cleanup_git &&
112 - "$GITP4" clone --dest="$git" //depot/sub/dir@all &&
112 + git p4 clone --dest="$git" //depot/sub/dir@all &&
113 (
114 cd "$git" &&
115 test_path_is_file f4 &&
@@ -126,7 +126,7 @@ test_expect_success 'clone --use-client-spec' '
126 (
127 # big usage message
128 exec >/dev/null &&
129 - test_must_fail "$GITP4" clone --dest="$git" --use-client-spec
129 + test_must_fail git p4 clone --dest="$git" --use-client-spec
130 ) &&
131 cli2="$TRASH_DIRECTORY/cli2" &&
132 mkdir -p "$cli2" &&
@@ -142,7 +142,7 @@ test_expect_success 'clone --use-client-spec' '
142 ) &&
143 P4CLIENT=client2 &&
144 test_when_finished cleanup_git &&
145 - "$GITP4" clone --dest="$git" --use-client-spec //depot/... &&
145 + git p4 clone --dest="$git" --use-client-spec //depot/... &&
146 (
147 cd "$git" &&
148 test_path_is_file bus/dir/f4 &&
@@ -156,7 +156,7 @@ test_expect_success 'clone --use-client-spec' '
156 cd "$git" &&
157 git init &&
158 git config git-p4.useClientSpec true &&
159 - "$GITP4" sync //depot/... &&
159 + git p4 sync //depot/... &&
160 git checkout -b master p4/master &&
161 test_path_is_file bus/dir/f4 &&
162 test_path_is_missing file1
t/t9807-git-p4-submit.sh
+11 -11
@@ -1,6 +1,6 @@
1 #!/bin/sh
2
3 -test_description='git-p4 submit'
3 +test_description='git p4 submit'
4
5 . ./lib-git-p4.sh
6
@@ -19,7 +19,7 @@ test_expect_success 'init depot' '
19
20 test_expect_success 'submit with no client dir' '
21 test_when_finished cleanup_git &&
22 - "$GITP4" clone --dest="$git" //depot &&
22 + git p4 clone --dest="$git" //depot &&
23 (
24 cd "$git" &&
25 echo file2 >file2 &&
@@ -27,20 +27,20 @@ test_expect_success 'submit with no client dir' '
27 git commit -m "git commit 2" &&
28 rm -rf "$cli" &&
29 git config git-p4.skipSubmitEdit true &&
30 - "$GITP4" submit
30 + git p4 submit
31 )
32 '
33
34 # make two commits, but tell it to apply only from HEAD^
35 test_expect_success 'submit --origin' '
36 test_when_finished cleanup_git &&
37 - "$GITP4" clone --dest="$git" //depot &&
37 + git p4 clone --dest="$git" //depot &&
38 (
39 cd "$git" &&
40 test_commit "file3" &&
41 test_commit "file4" &&
42 git config git-p4.skipSubmitEdit true &&
43 - "$GITP4" submit --origin=HEAD^
43 + git p4 submit --origin=HEAD^
44 ) &&
45 (
46 cd "$cli" &&
@@ -52,30 +52,30 @@ test_expect_success 'submit --origin' '
52
53 test_expect_success 'submit with allowSubmit' '
54 test_when_finished cleanup_git &&
55 - "$GITP4" clone --dest="$git" //depot &&
55 + git p4 clone --dest="$git" //depot &&
56 (
57 cd "$git" &&
58 test_commit "file5" &&
59 git config git-p4.skipSubmitEdit true &&
60 git config git-p4.allowSubmit "nobranch" &&
61 - test_must_fail "$GITP4" submit &&
61 + test_must_fail git p4 submit &&
62 git config git-p4.allowSubmit "nobranch,master" &&
63 - "$GITP4" submit
63 + git p4 submit
64 )
65 '
66
67 test_expect_success 'submit with master branch name from argv' '
68 test_when_finished cleanup_git &&
69 - "$GITP4" clone --dest="$git" //depot &&
69 + git p4 clone --dest="$git" //depot &&
70 (
71 cd "$git" &&
72 test_commit "file6" &&
73 git config git-p4.skipSubmitEdit true &&
74 - test_must_fail "$GITP4" submit nobranch &&
74 + test_must_fail git p4 submit nobranch &&
75 git branch otherbranch &&
76 git reset --hard HEAD^ &&
77 test_commit "file7" &&
78 - "$GITP4" submit otherbranch
78 + git p4 submit otherbranch
79 ) &&
80 (
81 cd "$cli" &&
t/t9808-git-p4-chdir.sh
+3 -3
@@ -1,6 +1,6 @@
1 #!/bin/sh
2
3 -test_description='git-p4 relative chdir'
3 +test_description='git p4 relative chdir'
4
5 . ./lib-git-p4.sh
6
@@ -26,7 +26,7 @@ test_expect_success 'P4CONFIG and absolute dir clone' '
26 (
27 P4CONFIG=p4config && export P4CONFIG &&
28 sane_unset P4PORT P4CLIENT &&
29 - "$GITP4" clone --verbose --dest="$git" //depot
29 + git p4 clone --verbose --dest="$git" //depot
30 )
31 '
32
@@ -38,7 +38,7 @@ test_expect_success 'P4CONFIG and relative dir clone' '
38 (
39 P4CONFIG=p4config && export P4CONFIG &&
40 sane_unset P4PORT P4CLIENT &&
41 - "$GITP4" clone --verbose --dest="git" //depot
41 + git p4 clone --verbose --dest="git" //depot
42 )
43 '
44
t/t9809-git-p4-client-view.sh
+44 -44
@@ -1,6 +1,6 @@
1 #!/bin/sh
2
3 -test_description='git-p4 client view'
3 +test_description='git p4 client view'
4
5 . ./lib-git-p4.sh
6
@@ -96,25 +96,25 @@ test_expect_success 'init depot' '
96 test_expect_success 'unsupported view wildcard %%n' '
97 client_view "//depot/%%%%1/sub/... //client/sub/%%%%1/..." &&
98 test_when_finished cleanup_git &&
99 - test_must_fail "$GITP4" clone --use-client-spec --dest="$git" //depot
99 + test_must_fail git p4 clone --use-client-spec --dest="$git" //depot
100 '
101
102 test_expect_success 'unsupported view wildcard *' '
103 client_view "//depot/*/bar/... //client/*/bar/..." &&
104 test_when_finished cleanup_git &&
105 - test_must_fail "$GITP4" clone --use-client-spec --dest="$git" //depot
105 + test_must_fail git p4 clone --use-client-spec --dest="$git" //depot
106 '
107
108 test_expect_success 'wildcard ... only supported at end of spec 1' '
109 client_view "//depot/.../file11 //client/.../file11" &&
110 test_when_finished cleanup_git &&
111 - test_must_fail "$GITP4" clone --use-client-spec --dest="$git" //depot
111 + test_must_fail git p4 clone --use-client-spec --dest="$git" //depot
112 '
113
114 test_expect_success 'wildcard ... only supported at end of spec 2' '
115 client_view "//depot/.../a/... //client/.../a/..." &&
116 test_when_finished cleanup_git &&
117 - test_must_fail "$GITP4" clone --use-client-spec --dest="$git" //depot
117 + test_must_fail git p4 clone --use-client-spec --dest="$git" //depot
118 '
119
120 test_expect_success 'basic map' '
@@ -122,7 +122,7 @@ test_expect_success 'basic map' '
122 files="cli1/file11 cli1/file12" &&
123 client_verify $files &&
124 test_when_finished cleanup_git &&
125 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
125 + git p4 clone --use-client-spec --dest="$git" //depot &&
126 git_verify $files
127 '
128
@@ -130,7 +130,7 @@ test_expect_success 'client view with no mappings' '
130 client_view &&
131 client_verify &&
132 test_when_finished cleanup_git &&
133 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
133 + git p4 clone --use-client-spec --dest="$git" //depot &&
134 git_verify
135 '
136
@@ -139,7 +139,7 @@ test_expect_success 'single file map' '
139 files="file11" &&
140 client_verify $files &&
141 test_when_finished cleanup_git &&
142 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
142 + git p4 clone --use-client-spec --dest="$git" //depot &&
143 git_verify $files
144 '
145
@@ -150,7 +150,7 @@ test_expect_success 'later mapping takes precedence (entire repo)' '
150 cli2/dir2/file21 cli2/dir2/file22" &&
151 client_verify $files &&
152 test_when_finished cleanup_git &&
153 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
153 + git p4 clone --use-client-spec --dest="$git" //depot &&
154 git_verify $files
155 '
156
@@ -160,7 +160,7 @@ test_expect_success 'later mapping takes precedence (partial repo)' '
160 files="file21 file22" &&
161 client_verify $files &&
162 test_when_finished cleanup_git &&
163 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
163 + git p4 clone --use-client-spec --dest="$git" //depot &&
164 git_verify $files
165 '
166
@@ -176,7 +176,7 @@ test_expect_success 'depot path matching rejected client path' '
176 files="cli12/file21 cli12/file22" &&
177 client_verify $files &&
178 test_when_finished cleanup_git &&
179 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
179 + git p4 clone --use-client-spec --dest="$git" //depot &&
180 git_verify $files
181 '
182
@@ -187,7 +187,7 @@ test_expect_success 'exclusion wildcard, client rhs same (odd)' '
187 "-//depot/dir2/... //client/..." &&
188 client_verify &&
189 test_when_finished cleanup_git &&
190 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
190 + git p4 clone --use-client-spec --dest="$git" //depot &&
191 git_verify
192 '
193
@@ -197,7 +197,7 @@ test_expect_success 'exclusion wildcard, client rhs different (normal)' '
197 files="dir1/file11 dir1/file12" &&
198 client_verify $files &&
199 test_when_finished cleanup_git &&
200 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
200 + git p4 clone --use-client-spec --dest="$git" //depot &&
201 git_verify $files
202 '
203
@@ -207,7 +207,7 @@ test_expect_success 'exclusion single file' '
207 files="dir1/file11 dir1/file12 dir2/file21" &&
208 client_verify $files &&
209 test_when_finished cleanup_git &&
210 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
210 + git p4 clone --use-client-spec --dest="$git" //depot &&
211 git_verify $files
212 '
213
@@ -217,7 +217,7 @@ test_expect_success 'overlay wildcard' '
217 files="cli/file11 cli/file12 cli/file21 cli/file22" &&
218 client_verify $files &&
219 test_when_finished cleanup_git &&
220 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
220 + git p4 clone --use-client-spec --dest="$git" //depot &&
221 git_verify $files
222 '
223
@@ -227,7 +227,7 @@ test_expect_success 'overlay single file' '
227 files="cli/file11 cli/file12 cli/file21" &&
228 client_verify $files &&
229 test_when_finished cleanup_git &&
230 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
230 + git p4 clone --use-client-spec --dest="$git" //depot &&
231 git_verify $files
232 '
233
@@ -238,7 +238,7 @@ test_expect_success 'exclusion with later inclusion' '
238 files="dir1/file11 dir1/file12 dir2incl/file21 dir2incl/file22" &&
239 client_verify $files &&
240 test_when_finished cleanup_git &&
241 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
241 + git p4 clone --use-client-spec --dest="$git" //depot &&
242 git_verify $files
243 '
244
@@ -246,7 +246,7 @@ test_expect_success 'quotes on rhs only' '
246 client_view "//depot/dir1/... \"//client/cdir 1/...\"" &&
247 client_verify "cdir 1/file11" "cdir 1/file12" &&
248 test_when_finished cleanup_git &&
249 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
249 + git p4 clone --use-client-spec --dest="$git" //depot &&
250 git_verify "cdir 1/file11" "cdir 1/file12"
251 '
252
@@ -258,7 +258,7 @@ test_expect_success 'quotes on rhs only' '
258 test_expect_success 'clone --use-client-spec sets useClientSpec' '
259 client_view "//depot/... //client/..." &&
260 test_when_finished cleanup_git &&
261 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
261 + git p4 clone --use-client-spec --dest="$git" //depot &&
262 (
263 cd "$git" &&
264 git config --bool git-p4.useClientSpec >actual &&
@@ -273,7 +273,7 @@ test_expect_success 'subdir clone' '
273 files="dir1/file11 dir1/file12 dir2/file21 dir2/file22" &&
274 client_verify $files &&
275 test_when_finished cleanup_git &&
276 - "$GITP4" clone --use-client-spec --dest="$git" //depot/dir1 &&
276 + git p4 clone --use-client-spec --dest="$git" //depot/dir1 &&
277 git_verify dir1/file11 dir1/file12
278 '
279
@@ -283,14 +283,14 @@ test_expect_success 'subdir clone' '
283 test_expect_success 'subdir clone, submit modify' '
284 client_view "//depot/... //client/..." &&
285 test_when_finished cleanup_git &&
286 - "$GITP4" clone --use-client-spec --dest="$git" //depot/dir1 &&
286 + git p4 clone --use-client-spec --dest="$git" //depot/dir1 &&
287 (
288 cd "$git" &&
289 git config git-p4.skipSubmitEdit true &&
290 echo line >>dir1/file12 &&
291 git add dir1/file12 &&
292 git commit -m dir1/file12 &&
293 - "$GITP4" submit
293 + git p4 submit
294 ) &&
295 (
296 cd "$cli" &&
@@ -302,14 +302,14 @@ test_expect_success 'subdir clone, submit modify' '
302 test_expect_success 'subdir clone, submit add' '
303 client_view "//depot/... //client/..." &&
304 test_when_finished cleanup_git &&
305 - "$GITP4" clone --use-client-spec --dest="$git" //depot/dir1 &&
305 + git p4 clone --use-client-spec --dest="$git" //depot/dir1 &&
306 (
307 cd "$git" &&
308 git config git-p4.skipSubmitEdit true &&
309 echo file13 >dir1/file13 &&
310 git add dir1/file13 &&
311 git commit -m dir1/file13 &&
312 - "$GITP4" submit
312 + git p4 submit
313 ) &&
314 (
315 cd "$cli" &&
@@ -320,13 +320,13 @@ test_expect_success 'subdir clone, submit add' '
320 test_expect_success 'subdir clone, submit delete' '
321 client_view "//depot/... //client/..." &&
322 test_when_finished cleanup_git &&
323 - "$GITP4" clone --use-client-spec --dest="$git" //depot/dir1 &&
323 + git p4 clone --use-client-spec --dest="$git" //depot/dir1 &&
324 (
325 cd "$git" &&
326 git config git-p4.skipSubmitEdit true &&
327 git rm dir1/file12 &&
328 git commit -m "delete dir1/file12" &&
329 - "$GITP4" submit
329 + git p4 submit
330 ) &&
331 (
332 cd "$cli" &&
@@ -337,7 +337,7 @@ test_expect_success 'subdir clone, submit delete' '
337 test_expect_success 'subdir clone, submit copy' '
338 client_view "//depot/... //client/..." &&
339 test_when_finished cleanup_git &&
340 - "$GITP4" clone --use-client-spec --dest="$git" //depot/dir1 &&
340 + git p4 clone --use-client-spec --dest="$git" //depot/dir1 &&
341 (
342 cd "$git" &&
343 git config git-p4.skipSubmitEdit true &&
@@ -345,7 +345,7 @@ test_expect_success 'subdir clone, submit copy' '
345 cp dir1/file11 dir1/file11a &&
346 git add dir1/file11a &&
347 git commit -m "copy to dir1/file11a" &&
348 - "$GITP4" submit
348 + git p4 submit
349 ) &&
350 (
351 cd "$cli" &&
@@ -356,14 +356,14 @@ test_expect_success 'subdir clone, submit copy' '
356 test_expect_success 'subdir clone, submit rename' '
357 client_view "//depot/... //client/..." &&
358 test_when_finished cleanup_git &&
359 - "$GITP4" clone --use-client-spec --dest="$git" //depot/dir1 &&
359 + git p4 clone --use-client-spec --dest="$git" //depot/dir1 &&
360 (
361 cd "$git" &&
362 git config git-p4.skipSubmitEdit true &&
363 git config git-p4.detectRenames true &&
364 git mv dir1/file13 dir1/file13a &&
365 git commit -m "rename dir1/file13 to dir1/file13a" &&
366 - "$GITP4" submit
366 + git p4 submit
367 ) &&
368 (
369 cd "$cli" &&
@@ -419,7 +419,7 @@ test_expect_success 'overlay collision 1 to 2' '
419 client_verify $files &&
420 test_cmp actual "$cli"/filecollide &&
421 test_when_finished cleanup_git &&
422 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
422 + git p4 clone --use-client-spec --dest="$git" //depot &&
423 git_verify $files &&
424 test_cmp actual "$git"/filecollide
425 '
@@ -432,7 +432,7 @@ test_expect_failure 'overlay collision 2 to 1' '
432 client_verify $files &&
433 test_cmp actual "$cli"/filecollide &&
434 test_when_finished cleanup_git &&
435 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
435 + git p4 clone --use-client-spec --dest="$git" //depot &&
436 git_verify $files &&
437 test_cmp actual "$git"/filecollide
438 '
@@ -454,7 +454,7 @@ test_expect_failure 'overlay collision 1 to 2, but 2 deleted' '
454 files="file11 file12 file21 file22" &&
455 client_verify $files &&
456 test_when_finished cleanup_git &&
457 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
457 + git p4 clone --use-client-spec --dest="$git" //depot &&
458 git_verify $files
459 '
460
@@ -477,7 +477,7 @@ test_expect_failure 'overlay collision 1 to 2, but 2 deleted, then 1 updated' '
477 files="file11 file12 file21 file22" &&
478 client_verify $files &&
479 test_when_finished cleanup_git &&
480 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
480 + git p4 clone --use-client-spec --dest="$git" //depot &&
481 git_verify $files
482 '
483
@@ -533,7 +533,7 @@ test_expect_success 'overlay sync: initial git checkout' '
533 echo dir1/colA >actual &&
534 client_verify $files &&
535 test_cmp actual "$cli"/colA &&
536 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
536 + git p4 clone --use-client-spec --dest="$git" //depot &&
537 git_verify $files &&
538 test_cmp actual "$git"/colA
539 '
@@ -558,7 +558,7 @@ test_expect_success 'overlay sync: colA content switch' '
558 test_cmp actual "$cli"/colA &&
559 (
560 cd "$git" &&
561 - "$GITP4" sync --use-client-spec &&
561 + git p4 sync --use-client-spec &&
562 git merge --ff-only p4/master
563 ) &&
564 git_verify $files &&
@@ -585,7 +585,7 @@ test_expect_success 'overlay sync: colB appears' '
585 test_cmp actual "$cli"/colB &&
586 (
587 cd "$git" &&
588 - "$GITP4" sync --use-client-spec &&
588 + git p4 sync --use-client-spec &&
589 git merge --ff-only p4/master
590 ) &&
591 git_verify $files &&
@@ -613,7 +613,7 @@ test_expect_success 'overlay sync: colB disappears' '
613 test_when_finished cleanup_git &&
614 (
615 cd "$git" &&
616 - "$GITP4" sync --use-client-spec &&
616 + git p4 sync --use-client-spec &&
617 git merge --ff-only p4/master
618 ) &&
619 git_verify $files
@@ -671,7 +671,7 @@ test_expect_success 'overlay sync swap: initial git checkout' '
671 echo dir1/colA >actual &&
672 client_verify $files &&
673 test_cmp actual "$cli"/colA &&
674 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
674 + git p4 clone --use-client-spec --dest="$git" //depot &&
675 git_verify $files &&
676 test_cmp actual "$git"/colA
677 '
@@ -696,7 +696,7 @@ test_expect_failure 'overlay sync swap: colA no content switch' '
696 test_cmp actual "$cli"/colA &&
697 (
698 cd "$git" &&
699 - "$GITP4" sync --use-client-spec &&
699 + git p4 sync --use-client-spec &&
700 git merge --ff-only p4/master
701 ) &&
702 git_verify $files &&
@@ -723,7 +723,7 @@ test_expect_success 'overlay sync swap: colB appears' '
723 test_cmp actual "$cli"/colB &&
724 (
725 cd "$git" &&
726 - "$GITP4" sync --use-client-spec &&
726 + git p4 sync --use-client-spec &&
727 git merge --ff-only p4/master
728 ) &&
729 git_verify $files &&
@@ -753,7 +753,7 @@ test_expect_failure 'overlay sync swap: colB no change' '
753 test_when_finished cleanup_git &&
754 (
755 cd "$git" &&
756 - "$GITP4" sync --use-client-spec &&
756 + git p4 sync --use-client-spec &&
757 git merge --ff-only p4/master
758 ) &&
759 git_verify $files &&
@@ -801,7 +801,7 @@ test_expect_success 'quotes on lhs only' '
801 files="cdir1/file11 cdir1/file12" &&
802 client_verify $files &&
803 test_when_finished cleanup_git &&
804 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
804 + git p4 clone --use-client-spec --dest="$git" //depot &&
805 client_verify $files
806 '
807
@@ -809,7 +809,7 @@ test_expect_success 'quotes on both sides' '
809 client_view "\"//depot/dir 1/...\" \"//client/cdir 1/...\"" &&
810 client_verify "cdir 1/file11" "cdir 1/file12" &&
811 test_when_finished cleanup_git &&
812 - "$GITP4" clone --use-client-spec --dest="$git" //depot &&
812 + git p4 clone --use-client-spec --dest="$git" //depot &&
813 git_verify "cdir 1/file11" "cdir 1/file12"
814 '
815
t/t9810-git-p4-rcs.sh
+24 -24
@@ -84,13 +84,13 @@ scrub_ko_check () {
84 #
85 test_expect_success 'edit far away from RCS lines' '
86 test_when_finished cleanup_git &&
87 - "$GITP4" clone --dest="$git" //depot &&
87 + git p4 clone --dest="$git" //depot &&
88 (
89 cd "$git" &&
90 git config git-p4.skipSubmitEdit true &&
91 sed -i "s/^line7/line7 edit/" filek &&
92 git commit -m "filek line7 edit" filek &&
93 - "$GITP4" submit &&
93 + git p4 submit &&
94 scrub_k_check filek
95 )
96 '
@@ -100,14 +100,14 @@ test_expect_success 'edit far away from RCS lines' '
100 #
101 test_expect_success 'edit near RCS lines' '
102 test_when_finished cleanup_git &&
103 - "$GITP4" clone --dest="$git" //depot &&
103 + git p4 clone --dest="$git" //depot &&
104 (
105 cd "$git" &&
106 git config git-p4.skipSubmitEdit true &&
107 git config git-p4.attemptRCSCleanup true &&
108 sed -i "s/^line4/line4 edit/" filek &&
109 git commit -m "filek line4 edit" filek &&
110 - "$GITP4" submit &&
110 + git p4 submit &&
111 scrub_k_check filek
112 )
113 '
@@ -117,14 +117,14 @@ test_expect_success 'edit near RCS lines' '
117 #
118 test_expect_success 'edit keyword lines' '
119 test_when_finished cleanup_git &&
120 - "$GITP4" clone --dest="$git" //depot &&
120 + git p4 clone --dest="$git" //depot &&
121 (
122 cd "$git" &&
123 git config git-p4.skipSubmitEdit true &&
124 git config git-p4.attemptRCSCleanup true &&
125 sed -i "/Revision/d" filek &&
126 git commit -m "filek remove Revision line" filek &&
127 - "$GITP4" submit &&
127 + git p4 submit &&
128 scrub_k_check filek
129 )
130 '
@@ -134,14 +134,14 @@ test_expect_success 'edit keyword lines' '
134 #
135 test_expect_success 'scrub ko files differently' '
136 test_when_finished cleanup_git &&
137 - "$GITP4" clone --dest="$git" //depot &&
137 + git p4 clone --dest="$git" //depot &&
138 (
139 cd "$git" &&
140 git config git-p4.skipSubmitEdit true &&
141 git config git-p4.attemptRCSCleanup true &&
142 sed -i "s/^line4/line4 edit/" fileko &&
143 git commit -m "fileko line4 edit" fileko &&
144 - "$GITP4" submit &&
144 + git p4 submit &&
145 scrub_ko_check fileko &&
146 ! scrub_k_check fileko
147 )
@@ -168,7 +168,7 @@ test_expect_success 'cleanup after failure' '
168 #
169 test_expect_success 'do not scrub plain text' '
170 test_when_finished cleanup_git &&
171 - "$GITP4" clone --dest="$git" //depot &&
171 + git p4 clone --dest="$git" //depot &&
172 (
173 cd "$git" &&
174 git config git-p4.skipSubmitEdit true &&
@@ -181,7 +181,7 @@ test_expect_success 'do not scrub plain text' '
181 sed -i "s/^line5/line5 p4 edit/" file_text &&
182 p4 submit -d "file5 p4 edit"
183 ) &&
184 - ! "$GITP4" submit &&
184 + ! git p4 submit &&
185 (
186 # exepct something like:
187 # file_text - file(s) not opened on this client
@@ -239,7 +239,7 @@ p4_append_to_file () {
239 # even though the change itself would otherwise apply cleanly.
240 test_expect_success 'cope with rcs keyword expansion damage' '
241 test_when_finished cleanup_git &&
242 - "$GITP4" clone --dest="$git" //depot &&
242 + git p4 clone --dest="$git" //depot &&
243 (
244 cd "$git" &&
245 git config git-p4.skipSubmitEdit true &&
@@ -252,10 +252,10 @@ test_expect_success 'cope with rcs keyword expansion damage' '
252
253 git add kwfile1.c &&
254 git commit -m "Zap an RCS kw line" &&
255 - "$GITP4" submit &&
256 - "$GITP4" rebase &&
255 + git p4 submit &&
256 + git p4 rebase &&
257 git diff p4/master &&
258 - "$GITP4" commit &&
258 + git p4 commit &&
259 echo "try modifying in both" &&
260 cd "$cli" &&
261 p4 edit kwfile1.c &&
@@ -265,8 +265,8 @@ test_expect_success 'cope with rcs keyword expansion damage' '
265 echo "line from git at the top" | cat - kwfile1.c >kwfile1.c.new &&
266 mv kwfile1.c.new kwfile1.c &&
267 git commit -m "Add line in git at the top" kwfile1.c &&
268 - "$GITP4" rebase &&
269 - "$GITP4" submit
268 + git p4 rebase &&
269 + git p4 submit
270 )
271 '
272
@@ -280,7 +280,7 @@ test_expect_success 'cope with rcs keyword file deletion' '
280 cat kwdelfile.c &&
281 grep 1 kwdelfile.c
282 ) &&
283 - "$GITP4" clone --dest="$git" //depot &&
283 + git p4 clone --dest="$git" //depot &&
284 (
285 cd "$git" &&
286 grep Revision kwdelfile.c &&
@@ -288,7 +288,7 @@ test_expect_success 'cope with rcs keyword file deletion' '
288 git commit -m "Delete a file containing RCS keywords" &&
289 git config git-p4.skipSubmitEdit true &&
290 git config git-p4.attemptRCSCleanup true &&
291 - "$GITP4" submit
291 + git p4 submit
292 ) &&
293 (
294 cd "$cli" &&
@@ -301,7 +301,7 @@ test_expect_success 'cope with rcs keyword file deletion' '
301 # work fine without any special handling.
302 test_expect_success 'Add keywords in git which match the default p4 values' '
303 test_when_finished cleanup_git &&
304 - "$GITP4" clone --dest="$git" //depot &&
304 + git p4 clone --dest="$git" //depot &&
305 (
306 cd "$git" &&
307 echo "NewKW: \$Revision\$" >>kwfile1.c &&
@@ -309,7 +309,7 @@ test_expect_success 'Add keywords in git which match the default p4 values' '
309 git commit -m "Adding RCS keywords in git" &&
310 git config git-p4.skipSubmitEdit true &&
311 git config git-p4.attemptRCSCleanup true &&
312 - "$GITP4" submit
312 + git p4 submit
313 ) &&
314 (
315 cd "$cli" &&
@@ -325,7 +325,7 @@ test_expect_success 'Add keywords in git which match the default p4 values' '
325 #
326 test_expect_failure 'Add keywords in git which do not match the default p4 values' '
327 test_when_finished cleanup_git &&
328 - "$GITP4" clone --dest="$git" //depot &&
328 + git p4 clone --dest="$git" //depot &&
329 (
330 cd "$git" &&
331 echo "NewKW2: \$Revision:1\$" >>kwfile1.c &&
@@ -333,7 +333,7 @@ test_expect_failure 'Add keywords in git which do not match the default p4 value
333 git commit -m "Adding RCS keywords in git" &&
334 git config git-p4.skipSubmitEdit true &&
335 git config git-p4.attemptRCSCleanup true &&
336 - "$GITP4" submit
336 + git p4 submit
337 ) &&
338 (
339 cd "$cli" &&
@@ -356,7 +356,7 @@ test_expect_success 'merge conflict handling still works' '
356 p4 add -t ktext merge2.c &&
357 p4 submit -d "add merge test file"
358 ) &&
359 - "$GITP4" clone --dest="$git" //depot &&
359 + git p4 clone --dest="$git" //depot &&
360 (
361 cd "$git" &&
362 sed -e "/Hello/d" merge2.c >merge2.c.tmp &&
@@ -374,7 +374,7 @@ test_expect_success 'merge conflict handling still works' '
374 test -f merge2.c &&
375 git config git-p4.skipSubmitEdit true &&
376 git config git-p4.attemptRCSCleanup true &&
377 - !(echo "s" | "$GITP4" submit) &&
377 + !(echo "s" | git p4 submit) &&
378 git rebase --skip &&
379 ! test -f merge2.c
380 )