@@ -413,7 +413,7 @@ test_expect_success 'add simple p4 branches' '
413
413
cd branch1 &&
414
414
echo file1 >file1 &&
415
415
echo file2 >file2 &&
416
- p4 add file* &&
416
+ p4 add file1 file2 &&
417
417
p4 submit -d "branch1" &&
418
418
p4 integrate //depot/branch1/... //depot/branch2/... &&
419
419
p4 submit -d "branch2" &&
@@ -433,13 +433,12 @@ test_expect_success 'add simple p4 branches' '
433
433
# Finally, make an update to branch1 on P4 side to check if it is imported
434
434
# correctly by git-p4.
435
435
test_expect_success ' git-p4 clone simple branches' '
436
- git init "$git" &&
436
+ test_when_finished cleanup_git &&
437
+ test_create_repo "$git" &&
437
438
cd "$git" &&
438
439
git config git-p4.branchList branch1:branch2 &&
439
440
git config --add git-p4.branchList branch1:branch3 &&
440
- cd "$TRASH_DIRECTORY" &&
441
- "$GITP4" clone --dest="$git" --detect-branches //depot@all &&
442
- cd "$git" &&
441
+ "$GITP4" clone --dest=. --detect-branches //depot@all &&
443
442
git log --all --graph --decorate --stat &&
444
443
git reset --hard p4/depot/branch1 &&
445
444
test -f file1 &&
@@ -449,7 +448,7 @@ test_expect_success 'git-p4 clone simple branches' '
449
448
git reset --hard p4/depot/branch2 &&
450
449
test -f file1 &&
451
450
test -f file2 &&
452
- test \ ! -z file3 &&
451
+ test ! -f file3 &&
453
452
! grep -q update file2 &&
454
453
git reset --hard p4/depot/branch3 &&
455
454
test -f file1 &&
@@ -459,14 +458,12 @@ test_expect_success 'git-p4 clone simple branches' '
459
458
cd "$cli" &&
460
459
cd branch1 &&
461
460
p4 edit file2 &&
462
- echo file2_ >> file2 &&
463
- p4 submit -d "update file2 in branch3 " &&
461
+ echo file2_ >>file2 &&
462
+ p4 submit -d "update file2 in branch1 " &&
464
463
cd "$git" &&
465
464
git reset --hard p4/depot/branch1 &&
466
465
"$GITP4" rebase &&
467
- grep -q file2_ file2 &&
468
- cd "$TRASH_DIRECTORY" &&
469
- rm -rf "$git" && mkdir "$git"
466
+ grep -q file2_ file2
470
467
'
471
468
472
469
test_expect_success ' shutdown' '
0 commit comments