git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin C Meyer <bmeyer@rim.com>
To: git@vger.kernel.org
Cc: Benjamin C Meyer <bmeyer@rim.com>
Subject: [PATCH] Put quotes around branch names to prevent special characters from being interpreted by the shell.
Date: Fri,  4 Jun 2010 11:53:20 -0400	[thread overview]
Message-ID: <1275666800-31852-1-git-send-email-bmeyer@rim.com> (raw)

Perforce branch names with spaces (and other special characters) were causing issues.

Signed-off-by: Benjamin C Meyer <bmeyer@rim.com>
---
 contrib/fast-import/git-p4 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index c1ea643..d42b865 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -1228,7 +1228,7 @@ class P4Sync(Command):
         lostAndFoundBranches = set()
 
         for info in p4CmdList("branches"):
-            details = p4Cmd("branch -o %s" % info["branch"])
+            details = p4Cmd("branch -o \"%s\"" % info["branch"])
             viewIdx = 0
             while details.has_key("View%s" % viewIdx):
                 paths = details["View%s" % viewIdx].split(" ")
-- 
1.7.1

             reply	other threads:[~2010-06-04 16:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-04 15:53 Benjamin C Meyer [this message]
2010-06-06 21:55 ` [PATCH] Put quotes around branch names to prevent special characters from being interpreted by the shell Jeff King
2010-06-07  5:10   ` Jay Soffian
2010-06-07  5:48     ` Ævar Arnfjörð Bjarmason
2010-06-07  6:01       ` Ian Ward Comfort
2010-06-07  6:01       ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1275666800-31852-1-git-send-email-bmeyer@rim.com \
    --to=bmeyer@rim.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).