aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorSimon Hausmann <simon@lst.de>2007-05-27 15:48:01 +0200
committerSimon Hausmann <simon@lst.de>2007-05-27 15:48:01 +0200
commita3c55c09ecae2a9c852c8c10e668c901639e845b (patch)
treea05994542b8a23fa2620f3055f84b401f77ec0c3 /contrib
parentcb4f1280dd5691890abea4521bff0a3d6e3facfd (diff)
downloadgit-a3c55c09ecae2a9c852c8c10e668c901639e845b.tar.gz
git-a3c55c09ecae2a9c852c8c10e668c901639e845b.tar.xz
Fix creation of refs/remotes/p4/HEAD symbolic ref
Signed-off-by: Simon Hausmann <simon@lst.de>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/fast-import/git-p47
1 files changed, 1 insertions, 6 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index dbd5b3bcf..aeefadcd6 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -858,8 +858,6 @@ class P4Sync(Command):
print "Syncing with origin first by calling git fetch origin"
system("git fetch origin")
- createP4HeadRef = False;
-
if len(self.branch) == 0:
self.branch = self.refPrefix + "master"
if gitBranchExists("refs/heads/p4") and self.importIntoRemotes:
@@ -867,7 +865,7 @@ class P4Sync(Command):
system("git branch -D p4");
# create it /after/ importing, when master exists
if not gitBranchExists(self.refPrefix + "HEAD") and self.importIntoRemotes:
- createP4HeadRef = True
+ system("git symbolic-ref %sHEAD %s" % (self.refPrefix, self.branch))
if len(args) == 0:
if self.hasOrigin:
@@ -1117,9 +1115,6 @@ class P4Sync(Command):
self.gitOutput.close()
self.gitError.close()
- if createP4HeadRef:
- system("git symbolic-ref %sHEAD %s" % (self.refPrefix, self.branch))
-
return True
class P4Rebase(Command):