git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] doc: fix 'git status --help' character quoting

From
Philip Oakley <philipoakley@iee.org>
Date
Oct 20, 2014, 19:28 UTC
Message-ID
<DB0FCB7CEC8C453D9237CA4FFA687EDC@PhilipOakley>
In-Reply-To
<xmqqy4sa3bpk.fsf@gitster.dls.corp.google.com>
From: "Junio C Hamano" <gitster@pobox.com>
Show 5 quoted lines
> "Philip Oakley" <philipoakley@iee.org> writes:
>
>> From: "Junio C Hamano" <gitster@pobox.com>
>>> Philip Oakley <philipoakley@iee.org> writes:
>>>
...
Show 37 quoted lines
> [ (ASCII 0) change]
>> The reason I proposed the change is because on the web view, on my
>> machine, I questioned whether the specially formatted character
>> (remember its quotation is consumed by ascidoc) looked too much like
>> an Oh, so I specially checked on the original .txt to see if it was
>> correct there, which led me to the proposal for '00' in this case.
>>
>> I'd be just as happy with a single zero, as long as it's distinct 
>> from
>> O (as you probably know, in the depths of hsitory typewriters didn't
>> even have 0 and 1 keys - the O and l were used interchangably and 
>> many
>> fonts keep too much to that pattern of undifferetiability!)
>
> Yes, and that is why I said
>
>>> there is
>>> no risk for anybody to mistake "O" (oh) as part of digits, whether
>>> you use decimal or hexadecimal.
>
> ;-)
>
>> Note the more recent http://git-scm.com/docs/git-status has the
>> formatted round o and
>
> I think it is just the font. I just opened the above page with
> Chrome and futzed the text from '0' to '0123456789' to see how it
> look.  That round thing is consistent with how other digits are
> rendered.
>
> https://plus.google.com/u/0/+JunioCHamano/posts/dzNXV2FwP6K
>
> (sorry for a URL to plus)
>
>> https://www.kernel.org/pub/software/scm/git/docs/git-status.html
>> (which IIUC is out of date) has an unformatted 0.
> --

I've just had a look at how it formats when the zero is back-tick quoted s /ASCII 0/ASCII `0`/ and it looks OK with both Chromium and Firefox on my hack Ubuntu laptop - the character is colourised and full sized, and the --man page output looks unchanged and clearly a zero.

my hacky attempt at an in-line patch (squash in?) below:
--
Philip
----->8----
commit 51ec35a196057eae60bb9285c38fb22e49aae1b0
Author: Philip Oakley <philipoakley@iee.org>
Date:   Mon Oct 20 20:21:56 2014 +0100
    doc: 'git status' quote the zero (NUL) character
    Newer web rendering of 'git status --help --web' shows the zero in
    "NUL (ASCII 0)" as if it is a small 'o' character. Back-tick quote 
the
    zero to ensure it is displayed as a full size mono-spaced font.
    Signed-off-by: Philip Oakley <philipoakley@iee.org>
diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt
index 4d8d530..379aa08 100644
--- a/Documentation/git-status.txt
+++ b/Documentation/git-status.txt
@@ -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 `0`) 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 
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 9 in “doc: fix 'git status --help' character quoting”
  1. doc: fix 'git status --help' character quotingPhilip Oakley, Oct 19, 2014
  2. Junio C HamanoOct 19, 2014
  3. Philip OakleyOct 20, 2014
  4. Philip OakleyOct 20, 2014
  5. Junio C HamanoOct 20, 2014
  6. Philip OakleyOct 20, 2014
  7. Junio C HamanoOct 20, 2014
  8. Junio C HamanoOct 20, 2014
  9. Philip OakleyOct 21, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.