Skip to content

Commit ae3f41f

Browse files
Pete Wyckoffgitster
authored andcommitted
git-p4: test --keep-path
Make sure it leaves the path, below //depot, in git. Signed-off-by: Pete Wyckoff <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7fbe1ce commit ae3f41f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

t/t9806-git-p4-options.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,30 @@ test_expect_success 'clone --max-changes' '
9393
)
9494
'
9595

96+
test_expect_success 'clone --keep-path' '
97+
(
98+
cd "$cli" &&
99+
mkdir -p sub/dir &&
100+
echo f4 >sub/dir/f4 &&
101+
p4 add sub/dir/f4 &&
102+
p4 submit -d "change 4"
103+
) &&
104+
"$GITP4" clone --dest="$git" --keep-path //depot/sub/dir@all &&
105+
test_when_finished cleanup_git &&
106+
(
107+
cd "$git" &&
108+
test_path_is_missing f4 &&
109+
test_path_is_file sub/dir/f4
110+
) &&
111+
cleanup_git &&
112+
"$GITP4" clone --dest="$git" //depot/sub/dir@all &&
113+
(
114+
cd "$git" &&
115+
test_path_is_file f4 &&
116+
test_path_is_missing sub/dir/f4
117+
)
118+
'
119+
96120
test_expect_success 'kill p4d' '
97121
kill_p4d
98122
'

0 commit comments

Comments
 (0)