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

[BUG] git-p4 can't cope with dollars in filenames

From
Luke Diamand <luke@diamand.org>
Date
Sep 23, 2011, 19:38 UTC
Message-ID
<4E7CE053.2020309@diamand.org>
Hi!

If you have a dollar in a filename and attempt to submit it to Perforce via git-p4 it fails.

e.g. this sequence:

% touch foo\$bar.c % git commit -m 'whatever' foo\$bar.c % git-p4 submit

.... .... Submit aborted -- fix problems then use 'p4 submit -c 3'.

The problem is all the places that use the git-p4 read_pipe() function, which is a wrapper around os.popen(). popen() does shell expansion which does hilarious things to files with dollars in their name.

You can have hours of fun and entertainment with this. Adding a file called foo\`fortune\`.h is especially amusing.

I'm going to try to come up with a fix for this.
Luke
Message 1 of 1 in “[BUG] git-p4 can't cope with dollars in filenames”
  1. Luke DiamandSep 23, 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.