All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luke Diamand <luke@diamand.org>
To: Git List <git@vger.kernel.org>
Cc: Pete Wyckoff <pw@padd.com>
Subject: [BUG] git-p4 can't cope with dollars in filenames
Date: Fri, 23 Sep 2011 20:38:59 +0100	[thread overview]
Message-ID: <4E7CE053.2020309@diamand.org> (raw)

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

                 reply	other threads:[~2011-09-23 19:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4E7CE053.2020309@diamand.org \
    --to=luke@diamand.org \
    --cc=git@vger.kernel.org \
    --cc=pw@padd.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.