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

Re: ghost refs

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 17, 2010, 16:32 UTC
Message-ID
<7v8w8m3uqj.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20100417115111.GB28623@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 27 quoted lines
> I would also like to have consensus on this, too. But it seems like it
> gets bikeshedded to death every time it comes up.  But hey, why not try
> it one more time? :)
>
>> I'll list my preference off the top of my head as a firestarter.
>> 
>> NAME::
>> 
>> The name followed by what it is used for
>
> Yep, makes sense.
>
>> SYNOPSIS::
> ...
> As another example, for git-branch, I would suggest:
>
>   git branch [<options>]
>   git branch [<options>] <branchname> <start-point>
>   git branch -m [<oldbranch>] <newbranch>
>   git branch -d [<options>] <branchname>
>
> From that I can quickly see that there are four major modes: listing,
> creating a new branch, moving a branch, and deleting a branch. I would
> also be happy if each mode was explicitly described. Some of my favorite
> synopses are those of perl modules, which tend to give you a very short
> and readable code snippet of how you might use the module, along with
> comments showing anything non-obvious.
Yes, that makes a lot more sense than "list every possible option".
Show 28 quoted lines
>> Detailed discussion of concepts::
>> 
>> Some manual pages need to have discussion of basic concepts that would not
>> be a good fit for the DESCRIPTION section (e.g. "Detached HEAD" section in
>> "checkout" manual).  I am not sure if this kind of material is better
>> given in OPTIONS section close to the functional group (e.g. "History
>> Siimplification" heading in "log" manual).
>
> I would really prefer most of this material to be pushed out into its
> own manual pages, and referred to by name (e.g., say "see
> githistory(7) for a discussion of history simplification" or "history
> is simplified as described in githistory(7)").
>
> Here's my reasoning.  [jc: good summary of possible solutions skipped] 
> ...
>   3. factor it into githistory(7), and reference it by name
>
>      Obviously this is my favorite. :) It does have one downside,
>      though. If we convert pretty-formats.txt into gitpretty(7), then
>      searching for "oneline" in git-log may not turn up what you want.
>      I wonder if we can summarize with something like:
>
>        --format=:
>        --pretty=<oneline|full|raw>:
>        --oneline:
>          Format the output. See gitpretty(7).
>
>     in git-log(1).
I like the suggested outcome.

One way of doing this is to strip the description from pretty-format.txt and move the description to gitpretty.txt (and anything that supports pretty format will continue to include pretty-format.txt).

But we will need to list _all_ the options twice if we go this route; pretty-format.txt for the heading, and the descriptions in gitpretty.txt. Perhaps pretty-format.txt can be autogenerated from gitpretty.txt to keep them in sync.

> You didn't mention configuration variables.
Yeah, I forgot.
Show 13 quoted lines
> git-config (or perhaps even gitconfig(7)) should have a list of all
> variables and where they are described, like:
>
>   apply.ignorewhitespace        git-apply(1)
>   apply.whitespace              git-apply(1)
>   branch.autosetupmerge         git-branch(1)
>   [etc]
>
> There is not much point in having full descriptions in one giant list.
> Instead, you can peruse the whole list, and then go to the configuration
> section of the relevant manpage to see a bunch of related options. Such
> a list should be pretty easy to generate automatically from the other
> documentation.
Yes, I like it.
Previous: Jeff KingNext: Jakub Narebski
Message 16 of 30 in “ghost refs”
  1. John DlugoszApr 7, 2010
  2. Avery PennarunApr 7, 2010
  3. Jeff KingApr 7, 2010
  4. John DlugoszApr 7, 2010
  5. Avery PennarunApr 7, 2010
  6. John DlugoszApr 7, 2010
  7. Avery PennarunApr 7, 2010
  8. Jeff KingApr 8, 2010
  9. John DlugoszApr 8, 2010
  10. Junio C HamanoApr 8, 2010
  11. Jeff KingApr 8, 2010
  12. Junio C HamanoApr 8, 2010
  13. Avery PennarunApr 8, 2010
  14. Nicolas SebrechtApr 8, 2010
  15. Jeff KingApr 17, 2010
  16. Junio C HamanoApr 17, 2010
  17. Jakub NarebskiApr 17, 2010
  18. Junio C HamanoApr 18, 2010
  19. John DlugoszApr 19, 2010
  20. Yann DirsonApr 20, 2010
  21. Jeff KingApr 20, 2010
  22. ZeframApr 20, 2010
  23. Yann DirsonApr 20, 2010
  24. ZeframApr 20, 2010
  25. Jay SoffianApr 20, 2010
  26. Jeff KingApr 20, 2010
  27. Yann DirsonApr 20, 2010
  28. Jay SoffianApr 20, 2010
  29. Alex RiesenApr 20, 2010
  30. Jeff KingApr 20, 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.