Merge branch 'ah/doc-ls-files-quotepath'
Documentation for "git ls-files" did not refer to core.quotePath * ah/doc-ls-files-quotepath: Documentation: improve description for core.quotePath
This commit is contained in:
commit
ff3898649b
@ -350,16 +350,19 @@ core.checkStat::
|
|||||||
all fields, including the sub-second part of mtime and ctime.
|
all fields, including the sub-second part of mtime and ctime.
|
||||||
|
|
||||||
core.quotePath::
|
core.quotePath::
|
||||||
The commands that output paths (e.g. 'ls-files',
|
Commands that output paths (e.g. 'ls-files', 'diff'), will
|
||||||
'diff'), when not given the `-z` option, will quote
|
quote "unusual" characters in the pathname by enclosing the
|
||||||
"unusual" characters in the pathname by enclosing the
|
pathname in double-quotes and escaping those characters with
|
||||||
pathname in a double-quote pair and with backslashes the
|
backslashes in the same way C escapes control characters (e.g.
|
||||||
same way strings in C source code are quoted. If this
|
`\t` for TAB, `\n` for LF, `\\` for backslash) or bytes with
|
||||||
variable is set to false, the bytes higher than 0x80 are
|
values larger than 0x80 (e.g. octal `\302\265` for "micro" in
|
||||||
not quoted but output as verbatim. Note that double
|
UTF-8). If this variable is set to false, bytes higher than
|
||||||
quote, backslash and control characters are always
|
0x80 are not considered "unusual" any more. Double-quotes,
|
||||||
quoted without `-z` regardless of the setting of this
|
backslash and control characters are always escaped regardless
|
||||||
variable.
|
of the setting of this variable. A simple space character is
|
||||||
|
not considered "unusual". Many commands can output pathnames
|
||||||
|
completely verbatim using the `-z` option. The default value
|
||||||
|
is true.
|
||||||
|
|
||||||
core.eol::
|
core.eol::
|
||||||
Sets the line ending type to use in the working directory for
|
Sets the line ending type to use in the working directory for
|
||||||
|
@ -78,9 +78,10 @@ Example:
|
|||||||
:100644 100644 5be4a4...... 000000...... M file.c
|
:100644 100644 5be4a4...... 000000...... M file.c
|
||||||
------------------------------------------------
|
------------------------------------------------
|
||||||
|
|
||||||
When `-z` option is not used, TAB, LF, and backslash characters
|
Without the `-z` option, pathnames with "unusual" characters are
|
||||||
in pathnames are represented as `\t`, `\n`, and `\\`,
|
quoted as explained for the configuration variable `core.quotePath`
|
||||||
respectively.
|
(see linkgit:git-config[1]). Using `-z` the filename is output
|
||||||
|
verbatim and the line is terminated by a NUL byte.
|
||||||
|
|
||||||
diff format for merges
|
diff format for merges
|
||||||
----------------------
|
----------------------
|
||||||
|
@ -53,10 +53,9 @@ The index line includes the SHA-1 checksum before and after the change.
|
|||||||
The <mode> is included if the file mode does not change; otherwise,
|
The <mode> is included if the file mode does not change; otherwise,
|
||||||
separate lines indicate the old and the new mode.
|
separate lines indicate the old and the new mode.
|
||||||
|
|
||||||
3. TAB, LF, double quote and backslash characters in pathnames
|
3. Pathnames with "unusual" characters are quoted as explained for
|
||||||
are represented as `\t`, `\n`, `\"` and `\\`, respectively.
|
the configuration variable `core.quotePath` (see
|
||||||
If there is need for such substitution then the whole
|
linkgit:git-config[1]).
|
||||||
pathname is put in double quotes.
|
|
||||||
|
|
||||||
4. All the `file1` files in the output refer to files before the
|
4. All the `file1` files in the output refer to files before the
|
||||||
commit, and all the `file2` files refer to files after the commit.
|
commit, and all the `file2` files refer to files after the commit.
|
||||||
|
@ -192,10 +192,9 @@ ifndef::git-log[]
|
|||||||
given, do not munge pathnames and use NULs as output field terminators.
|
given, do not munge pathnames and use NULs as output field terminators.
|
||||||
endif::git-log[]
|
endif::git-log[]
|
||||||
+
|
+
|
||||||
Without this option, each pathname output will have TAB, LF, double quotes,
|
Without this option, pathnames with "unusual" characters are quoted as
|
||||||
and backslash characters replaced with `\t`, `\n`, `\"`, and `\\`,
|
explained for the configuration variable `core.quotePath` (see
|
||||||
respectively, and the pathname will be enclosed in double quotes if
|
linkgit:git-config[1]).
|
||||||
any of those replacements occurred.
|
|
||||||
|
|
||||||
--name-only::
|
--name-only::
|
||||||
Show only names of changed files.
|
Show only names of changed files.
|
||||||
|
@ -108,10 +108,9 @@ the information is read from the current index instead.
|
|||||||
When `--numstat` has been given, do not munge pathnames,
|
When `--numstat` has been given, do not munge pathnames,
|
||||||
but use a NUL-terminated machine-readable format.
|
but use a NUL-terminated machine-readable format.
|
||||||
+
|
+
|
||||||
Without this option, each pathname output will have TAB, LF, double quotes,
|
Without this option, pathnames with "unusual" characters are quoted as
|
||||||
and backslash characters replaced with `\t`, `\n`, `\"`, and `\\`,
|
explained for the configuration variable `core.quotePath` (see
|
||||||
respectively, and the pathname will be enclosed in double quotes if
|
linkgit:git-config[1]).
|
||||||
any of those replacements occurred.
|
|
||||||
|
|
||||||
-p<n>::
|
-p<n>::
|
||||||
Remove <n> leading slashes from traditional diff paths. The
|
Remove <n> leading slashes from traditional diff paths. The
|
||||||
|
@ -117,9 +117,12 @@ OPTIONS
|
|||||||
|
|
||||||
-z::
|
-z::
|
||||||
--null::
|
--null::
|
||||||
When showing `short` or `porcelain` status output, terminate
|
When showing `short` or `porcelain` status output, print the
|
||||||
entries in the status output with NUL, instead of LF. If no
|
filename verbatim and terminate the entries with NUL, instead of LF.
|
||||||
format is given, implies the `--porcelain` output format.
|
If no format is given, implies the `--porcelain` output format.
|
||||||
|
Without the `-z` option, filenames with "unusual" characters are
|
||||||
|
quoted as explained for the configuration variable `core.quotePath`
|
||||||
|
(see linkgit:git-config[1]).
|
||||||
|
|
||||||
-F <file>::
|
-F <file>::
|
||||||
--file=<file>::
|
--file=<file>::
|
||||||
|
@ -77,7 +77,8 @@ OPTIONS
|
|||||||
succeed.
|
succeed.
|
||||||
|
|
||||||
-z::
|
-z::
|
||||||
\0 line termination on output.
|
\0 line termination on output and do not quote filenames.
|
||||||
|
See OUTPUT below for more information.
|
||||||
|
|
||||||
-x <pattern>::
|
-x <pattern>::
|
||||||
--exclude=<pattern>::
|
--exclude=<pattern>::
|
||||||
@ -196,9 +197,10 @@ the index records up to three such pairs; one from tree O in stage
|
|||||||
the user (or the porcelain) to see what should eventually be recorded at the
|
the user (or the porcelain) to see what should eventually be recorded at the
|
||||||
path. (see linkgit:git-read-tree[1] for more information on state)
|
path. (see linkgit:git-read-tree[1] for more information on state)
|
||||||
|
|
||||||
When `-z` option is not used, TAB, LF, and backslash characters
|
Without the `-z` option, pathnames with "unusual" characters are
|
||||||
in pathnames are represented as `\t`, `\n`, and `\\`,
|
quoted as explained for the configuration variable `core.quotePath`
|
||||||
respectively.
|
(see linkgit:git-config[1]). Using `-z` the filename is output
|
||||||
|
verbatim and the line is terminated by a NUL byte.
|
||||||
|
|
||||||
|
|
||||||
Exclude Patterns
|
Exclude Patterns
|
||||||
|
@ -53,7 +53,8 @@ OPTIONS
|
|||||||
Show object size of blob (file) entries.
|
Show object size of blob (file) entries.
|
||||||
|
|
||||||
-z::
|
-z::
|
||||||
\0 line termination on output.
|
\0 line termination on output and do not quote filenames.
|
||||||
|
See OUTPUT FORMAT below for more information.
|
||||||
|
|
||||||
--name-only::
|
--name-only::
|
||||||
--name-status::
|
--name-status::
|
||||||
@ -82,8 +83,6 @@ Output Format
|
|||||||
-------------
|
-------------
|
||||||
<mode> SP <type> SP <object> TAB <file>
|
<mode> SP <type> SP <object> TAB <file>
|
||||||
|
|
||||||
Unless the `-z` option is used, TAB, LF, and backslash characters
|
|
||||||
in pathnames are represented as `\t`, `\n`, and `\\`, respectively.
|
|
||||||
This output format is compatible with what `--index-info --stdin` of
|
This output format is compatible with what `--index-info --stdin` of
|
||||||
'git update-index' expects.
|
'git update-index' expects.
|
||||||
|
|
||||||
@ -95,6 +94,11 @@ Object size identified by <object> is given in bytes, and right-justified
|
|||||||
with minimum width of 7 characters. Object size is given only for blobs
|
with minimum width of 7 characters. Object size is given only for blobs
|
||||||
(file) entries; for other entries `-` character is used in place of size.
|
(file) entries; for other entries `-` character is used in place of size.
|
||||||
|
|
||||||
|
Without the `-z` option, pathnames with "unusual" characters are
|
||||||
|
quoted as explained for the configuration variable `core.quotePath`
|
||||||
|
(see linkgit:git-config[1]). Using `-z` the filename is output
|
||||||
|
verbatim and the line is terminated by a NUL byte.
|
||||||
|
|
||||||
GIT
|
GIT
|
||||||
---
|
---
|
||||||
Part of the linkgit:git[1] suite
|
Part of the linkgit:git[1] suite
|
||||||
|
@ -322,10 +322,9 @@ When the `-z` option is given, pathnames are printed as is and
|
|||||||
without any quoting and lines are terminated with a NUL (ASCII 0x00)
|
without any quoting and lines are terminated with a NUL (ASCII 0x00)
|
||||||
byte.
|
byte.
|
||||||
|
|
||||||
Otherwise, all pathnames will be "C-quoted" if they contain any tab,
|
Without the `-z` option, pathnames with "unusual" characters are
|
||||||
linefeed, double quote, or backslash characters. In C-quoting, these
|
quoted as explained for the configuration variable `core.quotePath`
|
||||||
characters will be replaced with the corresponding C-style escape
|
(see linkgit:git-config[1]).
|
||||||
sequences and the resulting pathname will be double quoted.
|
|
||||||
|
|
||||||
|
|
||||||
CONFIGURATION
|
CONFIGURATION
|
||||||
|
Loading…
Reference in New Issue
Block a user