Fix creation of refs/remotes/p4/HEAD symbolic ref
Signed-off-by: Simon Hausmann <simon@lst.de>
Simon Hausmann committed
May 27, 2007 at 15:48 UTC
a3c55c09ecae2a9c852c8c10e668c901639e845b
1 file changed
+1
-6
contrib/fast-import/git-p4
+1
-6
@@ -858,8 +858,6 @@ class P4Sync(Command):
858
print "Syncing with origin first by calling git fetch origin"
859
system("git fetch origin")
860
861
- createP4HeadRef = False;
862
-
861
if len(self.branch) == 0:
862
self.branch = self.refPrefix + "master"
863
if gitBranchExists("refs/heads/p4") and self.importIntoRemotes:
@@ -867,7 +865,7 @@ class P4Sync(Command):
865
system("git branch -D p4");
866
# create it /after/ importing, when master exists
867
if not gitBranchExists(self.refPrefix + "HEAD") and self.importIntoRemotes:
870
- createP4HeadRef = True
868
+ system("git symbolic-ref %sHEAD %s" % (self.refPrefix, self.branch))
869
870
if len(args) == 0:
871
if self.hasOrigin:
@@ -1117,9 +1115,6 @@ class P4Sync(Command):
1115
self.gitOutput.close()
1116
self.gitError.close()
1117
1120
- if createP4HeadRef:
1121
- system("git symbolic-ref %sHEAD %s" % (self.refPrefix, self.branch))
1122
-
1118
return True
1119
1120
class P4Rebase(Command):