aboutsummaryrefslogtreecommitdiff
path: root/contrib/fast-import
diff options
context:
space:
mode:
authorPete Wyckoff <pw@padd.com>2011-03-16 16:52:46 -0400
committerJunio C Hamano <gitster@pobox.com>2011-03-16 14:34:16 -0700
commitaccad8e05e7503e456798a35e8bba6f83d8ad8b6 (patch)
tree3c3176b97e6b6a19de2d4ca79a9a49819b4f0599 /contrib/fast-import
parentf0c9fe050474e0f2a947366a82a62efd6afbf2ce (diff)
downloadgit-accad8e05e7503e456798a35e8bba6f83d8ad8b6.tar.gz
git-accad8e05e7503e456798a35e8bba6f83d8ad8b6.tar.xz
git-p4: fix sync new branch regression
e32e00d (git-p4: better message for "git-p4 sync" when not cloned, 2011-02-19) broke another use case, that of using "git-p4 sync" to import a new branch into an existing repository. Refine the fix again, on top of the fix in ac34efc. Reported-by: Michael Horowitz <michael.horowitz@ieee.org> Signed-off-by: Pete Wyckoff <pw@padd.com> Tested-by: Michael Horowitz <michael.horowitz@ieee.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/fast-import')
-rwxr-xr-xcontrib/fast-import/git-p44
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 3c44524cd..d4ddf8dc5 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -1694,7 +1694,9 @@ class P4Sync(Command):
changes.sort()
else:
- if not isinstance(self, P4Clone) and not self.p4BranchesInGit:
+ # catch "git-p4 sync" with no new branches, in a repo that
+ # does not have any existing git-p4 branches
+ if len(args) == 0 and not self.p4BranchesInGit:
die("No remote p4 branches. Perhaps you never did \"git p4 clone\" in here.");
if self.verbose:
print "Getting p4 changes for %s...%s" % (', '.join(self.depotPaths),