git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Philip Oakley" <philipoakley@iee.org>
Cc: "Andreas Heiduk" <asheiduk@gmail.com>, <git@vger.kernel.org>
Subject: Re: [PATCH] Documentation: Link git-ls-files to core.quotePath variable.
Date: Wed, 22 Feb 2017 13:02:55 -0800	[thread overview]
Message-ID: <xmqqh93maqgw.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <F71515D0E29940CA9C421D18480AD726@PhilipOakley> (Philip Oakley's message of "Wed, 22 Feb 2017 12:21:22 -0000")

"Philip Oakley" <philipoakley@iee.org> writes:

>> -When `-z` option is not used, TAB, LF, and backslash characters
>> -in pathnames are represented as `\t`, `\n`, and `\\`,
>> -respectively. The path is also quoted according to the
>> -configuration variable `core.quotePath` (see linkgit:git-config[1]).
>> +Without the `-z` option pathnamens with "unusual" characters are
>
> s/option pathnamens/option, pathnames/    # comma and spelling.

Thanks.  Will squash it in while queuing (I need to discard the new
text added in the previous attempt in the preimage to make it apply,
too).

-- >8 --
From: Andreas Heiduk <asheiduk@gmail.com>
Date: Wed, 22 Feb 2017 02:38:21 +0100
Subject: [PATCH] Documentation: clarify core.quotePath and update git-ls-files doc

Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Documentation/config.txt       | 22 ++++++++++++----------
 Documentation/git-ls-files.txt | 10 ++++++----
 2 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index f4721a048b..25e65aeb01 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -340,16 +340,18 @@ core.checkStat::
 	all fields, including the sub-second part of mtime and ctime.
 
 core.quotePath::
-	The commands that output paths (e.g. 'ls-files',
-	'diff'), when not given the `-z` option, will quote
-	"unusual" characters in the pathname by enclosing the
-	pathname in a double-quote pair and with backslashes the
-	same way strings in C source code are quoted.  If this
-	variable is set to false, the bytes higher than 0x80 are
-	not quoted but output as verbatim.  Note that double
-	quote, backslash and control characters are always
-	quoted without `-z` regardless of the setting of this
-	variable.
+	Commands that output paths (e.g. 'ls-files', 'diff'), will
+	quote "unusual" characters in the pathname by enclosing the
+	pathname in double-quotes and escaping those characters with
+	backslashes in the same way C escapes control characters (e.g.
+	`\t` for TAB, `\n` for LF, `\\` for backslash) or bytes with
+	values larger than 0x80 (e.g. octal `\265` for "micro").  If
+	this variable is set to false, bytes higher than 0x80 are not
+	considered "unusual" any more.  Double-quotes, backslash and
+	control characters are always escaped regardless of the
+	setting of this variable.  Many commands can output pathnames
+	completely verbatim using the `-z` option. The default value is
+	true.
 
 core.eol::
 	Sets the line ending type to use in the working directory for
diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt
index 078b556665..a415223b45 100644
--- a/Documentation/git-ls-files.txt
+++ b/Documentation/git-ls-files.txt
@@ -76,7 +76,8 @@ OPTIONS
 	succeed.
 
 -z::
-	\0 line termination on output.
+	\0 line termination on output and do not quote filenames.
+	See OUTPUT below for more information.
 
 -x <pattern>::
 --exclude=<pattern>::
@@ -192,9 +193,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
 path. (see linkgit:git-read-tree[1] for more information on state)
 
-When `-z` option is not used, TAB, LF, and backslash characters
-in pathnames are represented as `\t`, `\n`, and `\\`,
-respectively.
+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.
 
 
 Exclude Patterns
-- 
2.12.0-rc2-250-gd33575c7f2



  reply	other threads:[~2017-02-22 21:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-19 22:05 [PATCH] Documentation: Link git-ls-files to core.quotePath variable Andreas Heiduk
2017-02-21 20:48 ` Junio C Hamano
2017-02-22  1:20   ` Andreas Heiduk
2017-02-22  1:38   ` Andreas Heiduk
2017-02-22 12:21     ` Philip Oakley
2017-02-22 21:02       ` Junio C Hamano [this message]
2017-02-22 21:08         ` Andreas Heiduk
2017-02-24 20:37           ` [PATCH v2 0/2] " Andreas Heiduk
2017-02-24 20:37             ` [PATCH v2 1/2] Documentation: Improve description for core.quotePath Andreas Heiduk
2017-02-24 21:43               ` Jakub Narębski
2017-02-28 20:55                 ` Andreas Heiduk
2017-02-24 20:37             ` [PATCH v2 2/2] Documentation: Link descriptions of -z to core.quotePath Andreas Heiduk
2017-02-24 21:54               ` Jakub Narębski
2017-02-28 21:30                 ` Andreas Heiduk
2017-02-28 20:51               ` Junio C Hamano
2017-02-28 21:13                 ` Andreas Heiduk
2017-02-28 21:25                   ` Junio C Hamano
2017-02-22 17:41     ` [PATCH] Documentation: Link git-ls-files to core.quotePath variable 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqh93maqgw.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=asheiduk@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=philipoakley@iee.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).