提交 7c65b2eb 编写于 作者: M Matthieu Moy 提交者: Junio C Hamano

git-fast-import.txt: improve documentation for quoted paths

The documentation mentioned 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: NMatthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 462d97da
...@@ -562,8 +562,12 @@ A `<path>` string must use UNIX-style directory separators (forward ...@@ -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 slash `/`), may contain any byte other than `LF`, and must not
start with double quote (`"`). start with double quote (`"`).
If an `LF` or double quote must be encoded into `<path>` shell-style A path can use C-style string quoting; this is accepted in all cases
quoting should be used, e.g. `"path/with\n and \" in it"`. 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: The value of `<path>` must be in canonical form. That is it must not:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册