From: Matthieu Moy <Matthieu.Moy@imag.fr>
To: git@vger.kernel.org, gitster@pobox.com
Cc: Matthieu Moy <Matthieu.Moy@imag.fr>
Subject: [PATCH 1/2 v3] git-fast-import.txt: improve documentation for quoted paths
Date: Thu, 29 Nov 2012 20:11:32 +0100 [thread overview]
Message-ID: <1354216293-21921-1-git-send-email-Matthieu.Moy@imag.fr> (raw)
In-Reply-To: <20121129185404.GC17309@sigill.intra.peff.net>
The documentation mentionned only newlines and double quotes as
characters needing escaping, but the backslash also needs it. Also, the
documentation was not clearly saying that double quotes around the file
name were required (double quotes in the examples could be interpreted as
part of the sentence, not part of the actual string).
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
cut-and-paste of Peff's version, adapted from mine.
Documentation/git-fast-import.txt | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-fast-import.txt b/Documentation/git-fast-import.txt
index 959e4d3..d1844ea 100644
--- a/Documentation/git-fast-import.txt
+++ b/Documentation/git-fast-import.txt
@@ -562,8 +562,12 @@ A `<path>` string must use UNIX-style directory separators (forward
slash `/`), may contain any byte other than `LF`, and must not
start with double quote (`"`).
-If an `LF` or double quote must be encoded into `<path>` shell-style
-quoting should be used, e.g. `"path/with\n and \" in it"`.
+A path can use C-style string quoting; this is accepted in all cases
+and mandatory if the filename starts with double quote or contains
+`LF`. In C-style quoting, the complete name should be surrounded with
+double quotes, and any `LF`, backslash, or double quote characters
+must be escaped by preceding them with a backslash (e.g.,
+`"path/with\n, \\ and \" in it"`).
The value of `<path>` must be in canonical form. That is it must not:
--
1.8.0.319.g8abfee4
next prev parent reply other threads:[~2012-11-29 19:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-29 12:33 [PATCH] git-remote-mediawiki: escape double quotes and LF in file names Matthieu Moy
2012-11-29 16:25 ` Junio C Hamano
2012-11-29 16:57 ` Matthieu Moy
2012-11-29 17:00 ` [PATCH 1/2] git-fast-import.txt: improve documentation for quoted paths Matthieu Moy
2012-11-29 17:00 ` [PATCH 2/2 v2] git-remote-mediawiki: escape ", \, and LF in file names Matthieu Moy
2012-11-29 18:11 ` [PATCH 1/2] git-fast-import.txt: improve documentation for quoted paths Jeff King
2012-11-29 18:47 ` Matthieu Moy
2012-11-29 18:54 ` Jeff King
2012-11-29 19:11 ` Matthieu Moy [this message]
2012-11-29 19:11 ` [PATCH 2/2 v3] git-remote-mediawiki: escape ", \, and LF in file names Matthieu Moy
2012-11-29 19:33 ` [PATCH 1/2 v3] git-fast-import.txt: improve documentation for quoted paths Junio C Hamano
2012-11-29 19:46 ` Jeff King
2012-11-29 19:15 ` [PATCH 1/2] " Junio C Hamano
2012-11-29 19:19 ` Jeff King
2012-11-30 9:39 ` Matthieu Moy
2012-12-02 2:27 ` Junio C Hamano
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=1354216293-21921-1-git-send-email-Matthieu.Moy@imag.fr \
--to=matthieu.moy@imag.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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 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).