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

Re: [PATCH] revisions.txt: expand tabs to spaces in diagram

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
May 2, 2018, 06:20 UTC
Message-ID
<CAN0heSqeMFq4yVHX=8Ug3wOTEzrLXwE=PcF7UFWTRg_AbZEWWg@mail.gmail.com>
In-Reply-To
<xmqq7eomwtid.fsf@gitster-ct.c.googlers.com>
On 2 May 2018 at 06:50, Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
> Martin Ågren <martin.agren@gmail.com> writes:
>
>> The diagram renders fine in AsciiDoc before and after this patch.
>> Asciidoctor, on the other hand, ignores the tabs entirely, which results
>> in different indentation for different lines. The graph illustration
>> earlier in the document already uses spaces instead of a tab.
>
> Ouch.  We might want to teach Documentation/.gitattributes that
> indent-with-tab is unwelcome in that directory, after making this
> fix (and possibly similar ones to other files).

I actually grepped around a little for a leading tab, to see if I could immediately spot any similar issues. But there are tons of tabs here (about 13000). Most of them work out just fine, e.g., in the OPTIONS, where we tab-indent the descriptions.

So while we could try to move away from leading tabs in Documentation/, it would be a huge undertaking. Any kind of "do it while we're nearby" approach would take a long time to complete. And a one-off conversion would probably be a horrible idea. ;-)

I just noticed another difference in how the tabs are handled. In git-add.txt, which I just picked at random, the three continuation lines in the synopsis indent differently in AsciiDoc (which indents them more than in the .txt) and Asciidoctor (which indents them less than in the .txt). To me, this is more of a "if I didn't sit down and compare the two outputs, I would never think about these indentations -- they're both fine".

So it might be that the only places where leading tabs really matter is this kind of diagrams. Maybe we have a handful such bugs lingering among the 13000 tab-indented lines...

Martin
Previous: Junio C HamanoNext: brian m. carlson
Message 3 of 12 in “revisions.txt: expand tabs to spaces in diagram”
  1. revisions.txt: expand tabs to spaces in diagramMartin Ågren, Apr 30, 2018
  2. Junio C HamanoMay 2, 2018
  3. Martin ÅgrenMay 2, 2018
  4. brian m. carlsonMay 4, 2018
  5. Junio C HamanoMay 4, 2018
  6. 1/2 Documentation: use 8-space tabs with Asciidoctorbrian m. carlson, May 6, 2018
  7. 2/2 Documentation: render revisions correctly under Asciidoctorbrian m. carlson, May 6, 2018
  8. Martin ÅgrenMay 7, 2018
  9. brian m. carlsonMay 8, 2018
  10. Martin ÅgrenMay 8, 2018
  11. brian m. carlsonMay 9, 2018
  12. Junio C HamanoMay 7, 2018

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.