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

Re: [PATCH 4/5] doc: use .adoc extension for AsciiDoc files

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 7, 2025, 18:29 UTC
Message-ID
<xmqqh655fw23.fsf@gitster.g>
In-Reply-To
<xmqqtt95fx62.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 13 quoted lines
> "D. Ben Knoble" <ben.knoble@gmail.com> writes:
>
>>> Do we pass SubmittingPatches (and CodingGuidelines for that matter)
>>> through AsciiDoc?  They do not even have .txt suffix, so I suspect
>>> it is not.
>>
>> I don't know how (I didn't dig), but we do build and package
>> HTML-ified SubmittingPatches as both $(git
>> --html-path)/SubmittingPatches.{html,txt}. I don't see a build output
>
> I was wondering why we remove SubmittingPatches.txt with "make
> clean" there the other day.  There is a Documentation/Makefile
> target to create %.txt from % applied for SubmittingPatches.

Interesting. I very much am sympathetic to the original reasoning why Documentation/Makefile is set up this way at 049e64aa (Documentation: convert SubmittingPatches to AsciiDoc, 2017-11-12).

Here is what its commit log message says:
    Since the makefile needs a .txt extension in order to build with the
    rest of the documentation, simply copy the file.  Ignore the temporary
    file so it doesn't get checked in accidentally, and remove it as part of
    the clean process.  Do this instead of renaming the file so that people
    who have already linked to the documentation (who we're trying to help)
    don't find their links broken.  Avoid symlinking since Windows will not
    like that.

One could argue that we made a lot more damage when we renamed all the .txt files to .adoc to external links people have had forever, but I guess SubmittingPatches is more special than say git-add.txt or git.txt for that matter, as the latter class have preformatted ".html" copies people would link to rather than the original ".txt".

Before the "let's avoid renaming and instead copy to a temporary .txt file to run AsciiDoc on it" commit, it seems that we kept the file in our source tree without copying anywhere else? It is very much understandable as the target audiences are those who want to work on our code, so it is a fair assumption that they have local copies at hand, without others having to give them public URLs to read on the Web.

"CodingGuidelines" is still treated that way, which is probably what we want to fix, by exposing it on the Web. I'd imagine that it is sufficient to just rename it to "CodingGuidelines.adoc" without worrying about those who "have already linked to the documentation", but others may feel differently. And if we do decide to rename it, we may want to rethink what we do to "SubmittingPatches" as well.

We've had ".html" versions of the document out there for very long, so hopefully people would already have updated their links to point them, not the one without any suffix, in which case we can stop special casing "SubmittingPatches".

Thanks.
Previous: Junio C HamanoNext: brian m. carlson
Message 15 of 19 in “Convert AsciiDoc files to .adoc extension”
  1. 0/5 Convert AsciiDoc files to .adoc extensionbrian m. carlson, Jan 20, 2025
  2. 2/5 editorconfig: add .adoc extensionbrian m. carlson, Jan 20, 2025
  3. 3/5 gitattributes: mark AsciiDoc files as LF-onlybrian m. carlson, Jan 20, 2025
  4. 1/5 doc: update gitignore for .adoc extensionbrian m. carlson, Jan 20, 2025
  5. 4/5 doc: use .adoc extension for AsciiDoc filesbrian m. carlson, Jan 20, 2025
  6. Jean-Noël AvilaJan 20, 2025
  7. brian m. carlsonJan 20, 2025
  8. Junio C HamanoJan 20, 2025
  9. Jean-Noël AvilaJan 21, 2025
  10. M HickfordFeb 6, 2025
  11. Junio C HamanoFeb 6, 2025
  12. Junio C HamanoFeb 6, 2025
  13. D. Ben KnobleFeb 7, 2025
  14. Junio C HamanoFeb 7, 2025
  15. Junio C HamanoFeb 7, 2025
  16. brian m. carlsonFeb 7, 2025
  17. 5/5 Remove obsolete ".txt" extensions for AsciiDoc filesbrian m. carlson, Jan 20, 2025
  18. M HickfordJan 20, 2025
  19. D. Ben KnobleJan 20, 2025

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.