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

Re: [PATCH 6/8] Documentation/notes: simplify treatment of default display refs

From
Jeff King <peff@peff.net>
Date
May 12, 2010, 11:23 UTC
Message-ID
<20100512112342.GA23847@coredump.intra.peff.net>
In-Reply-To
<20100512105002.GB17740@progeny.tock>
On Wed, May 12, 2010 at 05:50:02AM -0500, Jonathan Nieder wrote:
Show 21 quoted lines
> > Searching
> > for "conflict" even in just a list of options should come up with
> > "merge.conflictstyle", and I had always intended for such a gitconfig.5
> > to have a full list.
> 
> Makes sense.  So the breakdown of that page might be
> 
>   Synopsis
>   Description
>     Syntax
>   Configuration items
>     Sections
>     Index
>   Core configuration
>   Identity
>   Suppressing advice
>   Command aliases
>   Colored output
>   Paginated output
>   Examples
>   See also

Yes, I think that is sane. One other option would be to put a few things like "identity" into git(1) (where it would presumably be part of an overall identity section covering the concepts, config options, and environment variables).

> To keep this maintainable, I would like to have a single source file
> with a short and long description for each configuration item.  Then
> a script would process it into an index and snippets for the relevant
> command pages.

My plan was to actually include the config's long description in the relevant manpage (so it will be close to point of use, and you can see the context while editing), and then pull the information out of each page for the index. Adding a short description would probably be simplest as a specially formatted comment. E.g., in git-add.txt:

   add.ignore-errors::
   // @CONFIG: ignore errors on 'git-add'
           Continue adding files when some files cannot be added due to
           indexing errors. Equivalent to using '--ignore-errors'.
and then process it with something like:
  perl -ne '
    m{^// @CONFIG: (.*)} && print "$last - $1\n"; $last = $_
  ' git-*.txt >config-index.txt

So it's sort of literate programming for documentation. :) The comment thing is obviously a hack, but it should work well in practice. You might be able to do some semantic markup with special attributes in asciidoc.

> I’m anxious to get started.  Thanks for the pointers.
I'm happy you're working on this. Thanks.
-Peff
Previous: Jonathan NiederNext: Jonathan Nieder
Message 16 of 21 in “filling out the notes man page”
  1. 0/8 filling out the notes man pageJonathan Nieder, May 9, 2010
  2. 1/8 Documentation/notes: document format of notes treesJonathan Nieder, May 9, 2010
  3. Jeff KingMay 9, 2010
  4. 2/8 Documentation/notes: describe content of notes blobsJonathan Nieder, May 9, 2010
  5. 3/8 Documentation/notes: add configuration sectionJonathan Nieder, May 9, 2010
  6. 4/8 Documentation/notes: simplify treatment of default notes refJonathan Nieder, May 9, 2010
  7. Thomas RastMay 12, 2010
  8. Jonathan NiederMay 12, 2010
  9. 5/8 Documentation/log: add a CONFIGURATION sectionJonathan Nieder, May 9, 2010
  10. Jeff KingMay 9, 2010
  11. 6/8 Documentation/notes: simplify treatment of default display refsJonathan Nieder, May 9, 2010
  12. Jeff KingMay 9, 2010
  13. Jonathan NiederMay 9, 2010
  14. Jeff KingMay 10, 2010
  15. Jonathan NiederMay 12, 2010
  16. Jeff KingMay 12, 2010
  17. 7/8 Documentation/notes: clean up description of rewriting configurationJonathan Nieder, May 9, 2010
  18. 8/8 Documentation/notes: nitpicksJonathan Nieder, May 9, 2010
  19. Johan HerlandMay 10, 2010
  20. Thomas RastMay 12, 2010
  21. Documentation/notes: fill out the man page a littleJonathan Nieder, May 12, 2010

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.