All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Brandon Williams <bmwill@google.com>,
	git@vger.kernel.org, sbeller@google.com, jo@durchholz.org
Subject: Re: [PATCH] submodule: prevent backslash expantion in submodule names
Date: Sun, 16 Apr 2017 20:09:14 -0700	[thread overview]
Message-ID: <xmqqr30rk9wl.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170408105901.2osi2zadboqxhf34@sigill.intra.peff.net> (Jeff King's message of "Sat, 8 Apr 2017 06:59:01 -0400")

Jeff King <peff@peff.net> writes:

> The reason I mentioned escaping earlier is I wondered what would happen
> when the submodule starts with a double-quote, or has a newline in the
> name. Git's normal quoting would include backslash escape sequences, and
> I wondered if we might be relying on any of these "read" calls to
> interpret them. But I don't think so, for two reasons.
>
> One, because that quoting also puts double-quotes around the name. So
> plain "read" would not be sufficient to de-quote for us anyway.

Correct. These are c-quoting and "read" does not know what to do
with them.

> And two, because these are being fed from "submodule--helper", which
> does not seem to quote in the first place.

Which probably is a bug we can fix safely, as submodule--helper is
merely an implementation detail of our toolset, not something the
end users' scripts can rely on.

      parent reply	other threads:[~2017-04-17  3:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-07  6:12 problem with backslash in directory name Joachim Durchholz
2017-04-07  6:30 ` Jeff King
2017-04-07  8:24   ` Joachim Durchholz
2017-04-07  8:40   ` Joachim Durchholz
2017-04-07 16:53   ` Brandon Williams
2017-04-07 16:55     ` Stefan Beller
2017-04-07 17:23       ` [PATCH] submodule: prevent backslash expantion in submodule names Brandon Williams
2017-04-07 17:35         ` Joachim Durchholz
2017-04-08 10:59         ` Jeff King
2017-04-08 20:32           ` Joachim Durchholz
2017-04-17  3:09           ` Junio C Hamano [this message]

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=xmqqr30rk9wl.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=bmwill@google.com \
    --cc=git@vger.kernel.org \
    --cc=jo@durchholz.org \
    --cc=peff@peff.net \
    --cc=sbeller@google.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.