Skip to content

Commit ae4479d

Browse files
committed
Merge branch 'pw/p4'
* pw/p4: git-p4: test clone @ALL git-p4: fix clone @ALL regression
2 parents adfe4e1 + f0c9fe0 commit ae4479d

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

contrib/fast-import/git-p4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1763,7 +1763,7 @@ class P4Sync(Command):
17631763

17641764
changes.sort()
17651765
else:
1766-
if not self.p4BranchesInGit:
1766+
if not isinstance(self, P4Clone) and not self.p4BranchesInGit:
17671767
die("No remote p4 branches. Perhaps you never did \"git p4 clone\" in here.");
17681768
if self.verbose:
17691769
print "Getting p4 changes for %s...%s" % (', '.join(self.depotPaths),

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)