summaryrefslogtreecommitdiff
path: root/contrib/fast-import/git-p4
diff options
context:
space:
mode:
authorLibravatar Simon Hausmann <simon@lst.de>2007-08-24 17:46:16 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-08-24 18:54:37 -0700
commit0058a33a8eb5a8bfcfc5f5e769a2517cff4b73f1 (patch)
tree1f96ade3c238a797b7f681ec64c5d59d98cbaa5d /contrib/fast-import/git-p4
parentgit-p4: Make 'git-p4 branches' work after an initial clone with git clone fro... (diff)
downloadtgif-0058a33a8eb5a8bfcfc5f5e769a2517cff4b73f1.tar.xz
git-p4: Fix warnings about non-existant refs/remotes/p4/HEAD ref when running git-p4 sync the first time after a git clone.
Don't create the p4/HEAD symbolic ref if p4/master doesn't exist yet. Signed-off-by: Simon Hausmann <simon@lst.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/fast-import/git-p4')
-rwxr-xr-xcontrib/fast-import/git-p42
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index b571e30473..55778c5775 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -1131,7 +1131,7 @@ class P4Sync(Command):
system("git update-ref %s refs/heads/p4" % self.branch)
system("git branch -D p4");
# create it /after/ importing, when master exists
- if not gitBranchExists(self.refPrefix + "HEAD") and self.importIntoRemotes:
+ if not gitBranchExists(self.refPrefix + "HEAD") and self.importIntoRemotes and gitBranchExists(self.branch):
system("git symbolic-ref %sHEAD %s" % (self.refPrefix, self.branch))
# TODO: should always look at previous commits,