All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Philip Oakley <philipoakley@iee.org>
Cc: GitList <git@vger.kernel.org>
Subject: Re: [PATCH] doc: fix 'git status --help' character quoting
Date: Sun, 19 Oct 2014 15:26:00 -0700	[thread overview]
Message-ID: <xmqqwq7vr91j.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1413728235-1504-1-git-send-email-philipoakley@iee.org> (Philip Oakley's message of "Sun, 19 Oct 2014 15:17:15 +0100")

Philip Oakley <philipoakley@iee.org> writes:

> Correct backtick quoting for some of the modification states to give
> consistent web rendering.

This is to match the way how "XY PATH1 -> PATH2" is typeset, I
presume.  Some in the body text are already `XY` to match, but some
others are not, and you are fixing them, all of which look good.

> While at it, use 00 for ASCII NUL to avoid any confusion with the letter O.

I do not think this is particularly a good change.  We try to follow
the convention of spelling ASCII value in decimal (e.g. "ASCII
double quote (34)"), and "00" is not the way how you usually spell a
number in decimal.  Existing description is perfectly fine; there is
no risk for anybody to mistake "O" (oh) as part of digits, whether
you use decimal or hexadecimal.

If you have an aversion to mentioning ASCII when clarifying which
character we talk about, you could of course do s/ASCII 0/'\0'/ but
I do not know if that is an improvement.

Thanks.

>
> Signed-off-by: Philip Oakley <philipoakley@iee.org>
> ---
>
> Noticed when reviewing a stackoverflow problem where the OP actually
> desired to just list those files with merge indicators present.
> ---
>  Documentation/git-status.txt | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt
> index def635f..1c01d3ac 100644
> --- a/Documentation/git-status.txt
> +++ b/Documentation/git-status.txt
> @@ -116,7 +116,7 @@ In the short-format, the status of each path is shown as
>  
>  where `PATH1` is the path in the `HEAD`, and the " `-> PATH2`" part is
>  shown only when `PATH1` corresponds to a different path in the
> -index/worktree (i.e. the file is renamed). The 'XY' is a two-letter
> +index/worktree (i.e. the file is renamed). The `XY` is a two-letter
>  status code.
>  
>  The fields (including the `->`) are separated from each other by a
> @@ -125,7 +125,7 @@ characters, that field will be quoted in the manner of a C string
>  literal: surrounded by ASCII double quote (34) characters, and with
>  interior special characters backslash-escaped.
>  
> -For paths with merge conflicts, `X` and 'Y' show the modification
> +For paths with merge conflicts, `X` and `Y` show the modification
>  states of each side of the merge. For paths that do not have merge
>  conflicts, `X` shows the status of the index, and `Y` shows the status
>  of the work tree.  For untracked paths, `XY` are `??`.  Other status
> @@ -189,7 +189,7 @@ There is also an alternate -z format recommended for machine parsing. In
>  that format, the status field is the same, but some other things
>  change.  First, the '\->' is omitted from rename entries and the field
>  order is reversed (e.g 'from \-> to' becomes 'to from'). Second, a NUL
> -(ASCII 0) follows each filename, replacing space as a field separator
> +(ASCII 00) follows each filename, replacing space as a field separator
>  and the terminating newline (but a space still separates the status
>  field from the first filename).  Third, filenames containing special
>  characters are not specially formatted; no quoting or

  reply	other threads:[~2014-10-19 22:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-19 14:17 [PATCH] doc: fix 'git status --help' character quoting Philip Oakley
2014-10-19 22:26 ` Junio C Hamano [this message]
2014-10-20 10:46   ` Philip Oakley
2014-10-20 11:31     ` Philip Oakley
2014-10-20 17:14     ` Junio C Hamano
2014-10-20 19:28       ` Philip Oakley
2014-10-20 19:54         ` Junio C Hamano
2014-10-20 20:02           ` Junio C Hamano
2014-10-21 22:08             ` Philip Oakley

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=xmqqwq7vr91j.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.