Skip to content

Commit

Permalink
Fix creation of refs/remotes/p4/HEAD symbolic ref
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Hausmann <simon@lst.de>
  • Loading branch information
Simon Hausmann committed May 27, 2007
1 parent cb4f128 commit a3c55c0
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions contrib/fast-import/git-p4
Original file line number Diff line number Diff line change
Expand Up @@ -858,16 +858,14 @@ 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:
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:
createP4HeadRef = True
system("git symbolic-ref %sHEAD %s" % (self.refPrefix, self.branch))

if len(args) == 0:
if self.hasOrigin:
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit a3c55c0

Please sign in to comment.