{"thread":{"id":"9635","subject":"[PATCH] git-p4: Fix warnings about non-existant refs/remotes/p4/HEAD ref when running git-p4 sync the first time after a git clone.","startedAt":"2007-08-24T15:46:16Z","lastAt":"2007-08-24T15:46:16Z","messageCount":1,"participants":["Simon Hausmann"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"51449","messageId":"200708241746.18853.simon@lst.de","threadId":"9635","inReplyTo":null,"subject":"[PATCH] git-p4: Fix warnings about non-existant refs/remotes/p4/HEAD ref when running git-p4 sync the first time after a git clone.","fromName":"Simon Hausmann","fromEmail":"simon@lst.de","sentAt":"2007-08-24T15:46:16Z","receivedAt":"2007-08-24T15:46:16Z","isPatch":true,"sender":{"key":"hausmann@kde.org","avatar":"https://gravatar.com/avatar/bc9aad4fb31dce17eb66e690e7b51fe980c62da3c225c785da35dd806b8da778?d=mp&s=160"},"body":"Don't create the p4/HEAD symbolic ref if p4/master doesn't exist yet.\n\nSigned-off-by: Simon Hausmann <simon@lst.de>\n---\n contrib/fast-import/git-p4 |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4\nindex b571e30..55778c5 100755\n--- a/contrib/fast-import/git-p4\n+++ b/contrib/fast-import/git-p4\n@@ -1131,7 +1131,7 @@ class P4Sync(Command):\n                 system(\"git update-ref %s refs/heads/p4\" % self.branch)\n                 system(\"git branch -D p4\");\n             # create it /after/ importing, when master exists\n-            if not gitBranchExists(self.refPrefix + \"HEAD\") and self.importIntoRemotes:\n+            if not gitBranchExists(self.refPrefix + \"HEAD\") and self.importIntoRemotes and gitBranchExists(self.branch):\n                 system(\"git symbolic-ref %sHEAD %s\" % (self.refPrefix, self.branch))\n \n         # TODO: should always look at previous commits,\n-- \n1.5.3.rc6.1.ge31f\n"}]}