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

Re: [doc] User Manual Suggestion

From
Jeff King <peff@peff.net>
Date
Apr 24, 2009, 20:24 UTC
Message-ID
<20090424202403.GB13561@coredump.intra.peff.net>
In-Reply-To
<0FC64949-689C-43A4-B656-9618E808962B@boostpro.com>
On Fri, Apr 24, 2009 at 03:00:19PM -0400, David Abrahams wrote:
Show 9 quoted lines
>> How did you find out about them?
>
> The first time?
>
>  $ man git
>
> [...]
>
> which makes no distinction [between porcelain and plumbing].

Really? The command list in my version is divided into "HIGH-LEVEL COMMANDS (PORCELAIN)" and "LOW-LEVEL COMMANDS (PLUMBING)", with the commands you mentioned falling into the latter. And skimming "git log Documentation/git.txt", it looks like it has been that way for some time.

There is a little discussion under the plumbing section of what plumbing is. It could perhaps be more emphatic in warning regular users away.

>> They are not in your PATH, so shell
>> completion doesn't find them.
>
> Huh?  `which git` works.  ls-tree is an argument to git as far as I know.

Yes, but shell completion will never present you with the text "ls-tree". You have to have found out about it somewhere else (and completion used to show, because git-ls-tree was in the PATH).

Show 5 quoted lines
>   $ xxx [--]help
>
> is usually OK if I already know xxx pretty well and just want a  
> refresher.  If know I'll need a little more than that, I use man straight 
> away.

git --help shows a list of common commands, but otherwise "git help foo" and "git foo --help" _do_ show the manpage. It may be that "man git" could use some cleanup; specific suggestions are welcome.

> What is "porcelain," please?  This is one among many examples of jargon 
> used only (or encountered by me for the first time) in the Git community.

I think I ended up explaining it later in my email, but let me know if you are still confused.

Show 5 quoted lines
>> The idea was to give a uniform calling convention without
>> unnecessarily confusing users by presenting a large number of
>> infrequently-used commands.
>
> It's not working, I'm sorry to say.

Right, that's why I'm trying to figure out why you are hung up on the low-level commands. The idea was that you wouldn't need to be exposed to them at all, but obviously you were (or if you were exposed, it would be in a list that was clearly marked as "this is low-level stuff that you don't really need to worry about". So I'm trying to figure out where it went wrong.

Show 5 quoted lines
>> At any rate, it is too late to change the calling convention for
>> plumbing.
>
> I disagree.  You can leave the old functionality there in a "deprecated" 
> state and change the way you advertise it.

But does that really help? It means that "git hash-object" is still there, which I thought was the problem you had. You can argue that it wouldn't be advertised to users, and so wouldn't be a problem, but that is _already_ the strategy we are using. So either that strategy is fine, in which case we are on the right track but may still have some work to do in properly implementing it. Or it's not, in which case your proposal is no better.

> It would even help a lot if the plumbing were all spelled "git-xxx"
> and the high level stuff were "git xxx."

Differentating calling conventions like that was proposed when dashed forms were deprecated and removed from the PATH. But if we had dashed forms for plumbing (i.e., not forwarding them via the "git" wrapper), then you have to do one of:

  - put them in the user's PATH. Now tab completion or looking in your
    PATH means you see _just_ the plumbing commands, and none of the
    high level ones. Which is one of the reasons they were removed from
    the PATH in the first place (due to numerous user complaints).
  - put them elsewhere, and force plumbing users to add $GIT_EXEC_PATH
    to their PATH. That becomes very annoying for casual plumbing users.
    If you come to the mailing list with a problem, I would have to jump
    through extra hoops to ask you to show me the output of "git
    ls-files".

Not to mention that the git wrapper does other useful things besides simply exec'ing. For example, it supports --git-dir, --bare, etc. So the problem is that the low-level commands _are_ still useful, and many people still want to call them, just like regular git commands. It's just that they are numerous and low-level, which makes them daunting for new users.

And it has become obvious over several years of the git mailing list that users, once they see mention of a command, must start investigating it to find out if and how it is useful. And I am not saying that is a failing of users; on the contrary, I think it is quite a healthy behavior on a unix-ish system. But it means that if we want not to advertise low-level commands, we have to be very careful about the ways in which we mention them.

Perhaps it would make sense for each plumbing command's man page to start with something like "this is a low-level command used for scripting git or investigating its internals. For high-level use, you may be more interested in $X", where $X may be "git commit" for write-tree, commit-tree, etc. And that would at least help intercept users before they get too confused.

Show 8 quoted lines
>>> [excuse me, but what the #@&*! is "porcelainish" supposed to mean?
>>> (http://www.kernel.org/pub/software/scm/git/docs/git-rev-parse.html)]
>>
>> Heh. That one is particularly egregious, because it rests on several
>> layers of git jargon. The low-level tools are plumbing, like pipes and
>> valves.
>
> ? I use the valves on my kitchen sink all the time.

Sorry, I meant the ones under the sink, that you would use if you were replacing the faucet. I would call the ones above "taps". But hopefully you get a sense of the distinction between plumbing and porcelain.

-Peff
Previous: David AbrahamsNext: David Abrahams
Message 13 of 90 in “[doc] User Manual Suggestion”
  1. David AbrahamsApr 22, 2009
  2. J. Bruce FieldsApr 23, 2009
  3. Michael WittenApr 23, 2009
  4. Jeff KingApr 23, 2009
  5. Michael WittenApr 23, 2009
  6. David AbrahamsApr 23, 2009
  7. Michael WittenApr 24, 2009
  8. Jeff KingApr 24, 2009
  9. J. Bruce FieldsApr 24, 2009
  10. David AbrahamsApr 24, 2009
  11. Jeff KingApr 24, 2009
  12. David AbrahamsApr 24, 2009
  13. Jeff KingApr 24, 2009
  14. David AbrahamsApr 24, 2009
  15. Björn SteinbrinkApr 24, 2009
  16. David AbrahamsApr 25, 2009
  17. Björn SteinbrinkApr 26, 2009
  18. Jeff KingApr 24, 2009
  19. Michael WittenApr 24, 2009
  20. Michael WittenApr 24, 2009
  21. Jeff KingApr 24, 2009
  22. Michael WittenApr 24, 2009
  23. J. Bruce FieldsApr 24, 2009
  24. Jeff KingApr 24, 2009
  25. J. Bruce FieldsApr 24, 2009
  26. Michael WittenApr 24, 2009
  27. David AbrahamsApr 23, 2009
  28. Johan HerlandApr 23, 2009
  29. Michael WittenApr 24, 2009
  30. Johan HerlandApr 24, 2009
  31. Daniel BarkalowApr 24, 2009
  32. Jeff KingApr 24, 2009
  33. Michael WittenApr 24, 2009
  34. Michael WittenApr 24, 2009
  35. Daniel BarkalowApr 24, 2009
  36. Jeff KingApr 24, 2009
  37. Michael WittenApr 24, 2009
  38. Michael WittenApr 24, 2009
  39. Jeff KingApr 24, 2009
  40. Michael WittenApr 25, 2009
  41. Felipe ContrerasApr 25, 2009
  42. Michael WittenApr 24, 2009
  43. Daniel BarkalowApr 25, 2009
  44. Michael WittenApr 25, 2009
  45. Felipe ContrerasApr 25, 2009
  46. David AbrahamsApr 25, 2009
  47. Felipe ContrerasApr 25, 2009
  48. Björn SteinbrinkApr 26, 2009
  49. David AbrahamsApr 26, 2009
  50. Björn SteinbrinkApr 26, 2009
  51. David AbrahamsApr 26, 2009
  52. Björn SteinbrinkApr 26, 2009
  53. David AbrahamsApr 27, 2009
  54. David AbrahamsApr 27, 2009
  55. Michael WittenApr 27, 2009
  56. Michael WittenApr 26, 2009
  57. Björn SteinbrinkApr 26, 2009
  58. David AbrahamsApr 26, 2009
  59. David AbrahamsApr 25, 2009
  60. Björn SteinbrinkApr 24, 2009
  61. Michael WittenApr 25, 2009
  62. David AbrahamsApr 25, 2009
  63. Björn SteinbrinkApr 26, 2009
  64. Björn SteinbrinkMay 2, 2009
  65. Michael WittenMay 2, 2009
  66. Björn SteinbrinkMay 2, 2009
  67. Michael WittenMay 2, 2009
  68. Björn SteinbrinkMay 2, 2009
  69. Michael WittenMay 3, 2009
  70. Björn SteinbrinkMay 3, 2009
  71. Mark LodatoMay 3, 2009
  72. Michael WittenMay 3, 2009
  73. Daniel BarkalowApr 24, 2009
  74. Jeff KingApr 24, 2009
  75. Björn SteinbrinkApr 26, 2009
  76. Michael WittenApr 24, 2009
  77. Björn SteinbrinkApr 27, 2009
  78. David AbrahamsApr 25, 2009
  79. Michael WittenApr 25, 2009
  80. Jeff KingApr 25, 2009
  81. David AbrahamsApr 25, 2009
  82. Jeff KingApr 29, 2009
  83. David AbrahamsApr 29, 2009
  84. Jeff KingApr 29, 2009
  85. J. Bruce FieldsApr 24, 2009
  86. Michael WittenApr 24, 2009
  87. David AbrahamsApr 24, 2009
  88. J. Bruce FieldsApr 24, 2009
  89. J. Bruce FieldsApr 24, 2009
  90. Felipe ContrerasApr 25, 2009

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.