3 test_description
='git p4 transparency to shell metachars in filenames'
5 TEST_PASSES_SANITIZE_LEAK
=true
8 test_expect_success
'start p4d' '
12 test_expect_success
'init depot' '
21 test_expect_success
'shell metachars in filenames' '
22 git p4 clone --dest="$git" //depot &&
23 test_when_finished cleanup_git &&
26 git config git-p4.skipSubmitEditCheck true &&
29 echo f2 >"file with spaces" &&
30 git add "file with spaces" &&
31 git commit -m "add files" &&
32 P4EDITOR="test-tool chmtime +5" git p4 submit
37 test -e "file with spaces" &&
42 test_expect_success
'deleting with shell metachars' '
43 git p4 clone --dest="$git" //depot &&
44 test_when_finished cleanup_git &&
47 git config git-p4.skipSubmitEditCheck true &&
49 git rm file\ with\ spaces &&
50 git commit -m "remove files" &&
51 P4EDITOR="test-tool chmtime +5" git p4 submit
56 test ! -e "file with spaces" &&
61 # Create a branch with a shell metachar in its name
66 test_expect_success
'branch with shell char' '
67 test_when_finished cleanup_git &&
68 test_create_repo "$git" &&
76 p4 submit -d "main/f1" &&
78 p4 integrate //depot/main/... //depot/branch\$3/... &&
79 p4 submit -d "integrate main to branch\$3" &&
81 echo f1 >branch\$3/shell_char_branch_file &&
82 p4 add branch\$3/shell_char_branch_file &&
83 p4 submit -d "branch\$3/shell_char_branch_file" &&
85 p4 branch -i <<-EOF &&
87 View: //depot/main/... //depot/branch\$3/...
91 echo "a change" >> main/f1 &&
92 p4 submit -d "a change" main/f1 &&
94 p4 integrate -b branch\$3 &&
95 p4 resolve -am branch\$3/... &&
96 p4 submit -d "integrate main to branch\$3" &&
100 git config git-p4.branchList main:branch\$3 &&
101 git p4 clone --dest=. --detect-branches //depot@all &&
102 git log --all --graph --decorate --stat &&
103 git reset --hard p4/depot/branch\$3 &&
104 test -f shell_char_branch_file &&