git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-p4: Fix 'p4 opened' in git-p4 for names with spaces

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 14, 2010, 23:16 UTC
Message-ID
<7vvd2wq72l.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1292360165-26771-2-git-send-email-jerzy.kozera@gmail.com>
Jerzy Kozera <jerzy.kozera@gmail.com> writes:
Show 15 quoted lines
> Signed-off-by: Jerzy Kozera <jerzy.kozera@gmail.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 04ce7e3..a5297e7 100755
> --- a/contrib/fast-import/git-p4
> +++ b/contrib/fast-import/git-p4
> @@ -144,7 +144,7 @@ def setP4ExecBit(file, mode):
>  def getP4OpenedType(file):
>      # Returns the perforce file type for the given file.
>  
> -    result = p4_read_pipe("opened %s" % file)
> +    result = p4_read_pipe("opened \"%s\"" % file)
Don't you need a lot more than that?  What if file has " or \ in it?
Previous: Jerzy KozeraNext: Reece Dunn
Message 3 of 8 in “git-p4: Fix 'p4 opened' in git-p4 for names with spaces”
  1. git-p4: Fix 'p4 opened' in git-p4 for names with spacesJerzy Kozera, Dec 14, 2010
  2. git-p4: Fix 'p4 opened' in git-p4 for names with spacesJerzy Kozera, Dec 14, 2010
  3. Junio C HamanoDec 14, 2010
  4. Reece DunnDec 14, 2010
  5. git-p4: Fixed handling of file names with spacesJerzy Kozera, Jan 13, 2011
  6. Andreas SchwabJan 14, 2011
  7. Jerzy KozeraJan 14, 2011
  8. Pete WyckoffJan 15, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.