Skip to content

Commit f0c9fe0

Browse files
Pete Wyckoffgitster
authored andcommitted
git-p4: test clone @ALL
Cloning a p4 depot by default generates a single commit. The use of the "@ALL" revision specifier instead tells git-p4 to import all commits. Check to make sure both these invocations work as expected. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent ac34efc commit f0c9fe0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

t/t9800-git-p4.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,27 @@ test_expect_success 'add p4 files' '
3737
echo file1 >file1 &&
3838
p4 add file1 &&
3939
p4 submit -d "file1" &&
40+
echo file2 >file2 &&
41+
p4 add file2 &&
42+
p4 submit -d "file2" &&
4043
cd "$TRASH_DIRECTORY"
4144
'
4245

4346
test_expect_success 'basic git-p4 clone' '
4447
"$GITP4" clone --dest="$git" //depot &&
48+
cd "$git" &&
49+
git log --oneline >lines &&
50+
test_line_count = 1 lines &&
51+
cd .. &&
52+
rm -rf "$git" && mkdir "$git"
53+
'
54+
55+
test_expect_success 'git-p4 clone @all' '
56+
"$GITP4" clone --dest="$git" //depot@all &&
57+
cd "$git" &&
58+
git log --oneline >lines &&
59+
test_line_count = 2 lines &&
60+
cd .. &&
4561
rm -rf "$git" && mkdir "$git"
4662
'
4763

0 commit comments

Comments
 (0)