mirror of
https://github.com/git/git.git
synced 2025-03-27 18:19:41 +00:00
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>
This commit is contained in:
parent
5ca4461728
commit
0058a33a8e
@ -1131,7 +1131,7 @@ class P4Sync(Command):
|
|||||||
system("git update-ref %s refs/heads/p4" % self.branch)
|
system("git update-ref %s refs/heads/p4" % self.branch)
|
||||||
system("git branch -D p4");
|
system("git branch -D p4");
|
||||||
# create it /after/ importing, when master exists
|
# 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))
|
system("git symbolic-ref %sHEAD %s" % (self.refPrefix, self.branch))
|
||||||
|
|
||||||
# TODO: should always look at previous commits,
|
# TODO: should always look at previous commits,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user