From: Fredrik Gustafsson <iveqy@iveqy.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Fredrik Gustafsson <iveqy@iveqy.com>,
Jens Lehmann <Jens.Lehmann@web.de>,
Ilya Kulakov <kulakov.ilya@gmail.com>,
git@vger.kernel.org
Subject: Re: Bug: `gitsubmodule` does not list modules with unicode characters
Date: Sat, 8 Jun 2013 14:06:00 +0200 [thread overview]
Message-ID: <20130608120600.GA2159@paksenarrion.iveqy.com> (raw)
In-Reply-To: <20130608091836.GA2925@elie.Belkin>
On Sat, Jun 08, 2013 at 02:18:36AM -0700, Jonathan Nieder wrote:
> The whole point of "-z" is that by using a terminator that is guaranteed
> not to appear in filenames, it avoids the need to quote filenames.
> Otherwise at least \n would need to be quoted.
Thanks, now I understand why.
>
> How about something like this patch?
>
> -- >8 --
> Subject: ls-files doc: clarify purpose of "-z" option
>
> The purpose of the "-z" option is to avoid quoting issues by using a
> delimiter that implies a binary-clean parser and cannot appear in
> filenames, and in that spirit, "-z" turns off C-style quoting. But
> without looking carefully through the entire manpage, it is too easy
> to miss that.
>
> Reported-by: Fredrik Gustafsson <iveqy@iveqy.com>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
> ---
> Documentation/git-ls-files.txt | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt
> index c0856a6e..753c223f 100644
> --- a/Documentation/git-ls-files.txt
> +++ b/Documentation/git-ls-files.txt
> @@ -75,7 +75,9 @@ OPTIONS
> succeed.
>
> -z::
> - \0 line termination on output.
> + Terminate lines with NUL instead of LF.
> + This avoids the need to quote filenames; see the Output section
> + below for details.
>
> -x <pattern>::
> --exclude=<pattern>::
> --
> 1.8.3
>
That would be very helpfull. I would suggest to add something about
unicode also (and maybe about the quotes that's added?). I'm a bit
unsure about the formulating but how about something like this:
From 114c34ea482873b39c02e63eeaf866c3e9ebfc14 Mon Sep 17 00:00:00 2001
From: Jonathan Nieder <jrnieder@gmail.com>
Date: Sat, 8 Jun 2013 02:18:36 -0700
Subject: [PATCH] Subject: ls-files doc: clarify purpose of "-z" option
The purpose of the "-z" option is to avoid quoting issues by using a
delimiter that implies a binary-clean parser and cannot appear in
filenames, and in that spirit, "-z" turns off C-style quoting. But
without looking carefully through the entire manpage, it is too easy
to miss that.
Reported-by: Fredrik Gustafsson <iveqy@iveqy.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Documentation/git-ls-files.txt | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt
index c0856a6..ef785ba 100644
--- a/Documentation/git-ls-files.txt
+++ b/Documentation/git-ls-files.txt
@@ -75,7 +75,9 @@ OPTIONS
succeed.
-z::
- \0 line termination on output.
+ Terminate lines with NUL instead of LF.
+ This avoids the need to quote filenames; see the Output section
+ below for details.
-x <pattern>::
--exclude=<pattern>::
@@ -172,7 +174,8 @@ 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.
+respectively. Multibyte characters are represented by they escaped
+equivalents.
Exclude Patterns
--
1.8.1.5
--
Med vänliga hälsningar
Fredrik Gustafsson
tel: 0733-608274
e-post: iveqy@iveqy.com
prev parent reply other threads:[~2013-06-08 12:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-23 16:28 Bug: `gitsubmodule` does not list modules with unicode characters Ilya Kulakov
2013-03-25 8:30 ` Jens Lehmann
2013-06-08 1:05 ` Fredrik Gustafsson
2013-06-08 9:18 ` Jonathan Nieder
2013-06-08 12:06 ` Fredrik Gustafsson [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=20130608120600.GA2159@paksenarrion.iveqy.com \
--to=iveqy@iveqy.com \
--cc=Jens.Lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=kulakov.ilya@gmail.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).