3 test_description='git p4 transparency to shell metachars in filenames'
7 test_expect_success 'start p4d' '
11 test_expect_success 'init depot' '
20 test_expect_success 'shell metachars in filenames' '
21 git p4 clone --dest="$git" //depot &&
22 test_when_finished cleanup_git &&
25 git config git-p4.skipSubmitEditCheck true &&
28 echo f2 >"file with spaces" &&
29 git add "file with spaces" &&
30 git commit -m "add files" &&
31 P4EDITOR=touch git p4 submit
36 test -e "file with spaces" &&
41 test_expect_success 'deleting with shell metachars' '
42 git p4 clone --dest="$git" //depot &&
43 test_when_finished cleanup_git &&
46 git config git-p4.skipSubmitEditCheck true &&
48 git rm file\ with\ spaces &&
49 git commit -m "remove files" &&
50 P4EDITOR=touch git p4 submit
55 test ! -e "file with spaces" &&
60 # Create a branch with a shell metachar in its name
65 test_expect_success 'branch with shell char' '
66 test_when_finished cleanup_git &&
67 test_create_repo "$git" &&
75 p4 submit -d "main/f1" &&
77 p4 integrate //depot/main/... //depot/branch\$3/... &&
78 p4 submit -d "integrate main to branch\$3" &&
80 echo f1 >branch\$3/shell_char_branch_file &&
81 p4 add branch\$3/shell_char_branch_file &&
82 p4 submit -d "branch\$3/shell_char_branch_file" &&
84 p4 branch -i <<-EOF &&
86 View: //depot/main/... //depot/branch\$3/...
90 echo "a change" >> main/f1 &&
91 p4 submit -d "a change" main/f1 &&
93 p4 integrate -b branch\$3 &&
94 p4 resolve -am branch\$3/... &&
95 p4 submit -d "integrate main to branch\$3" &&
99 git config git-p4.branchList main:branch\$3 &&
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 &&
108 test_expect_success 'kill p4d' '