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

Re: [PATCH/RFC 0/3] add/commit -u/-a/-A

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Feb 26, 2011, 10:30 UTC
Message-ID
<4D68D630.9000608@drmicha.warpmail.net>
In-Reply-To
<7vr5aw9b7m.fsf@alter.siamese.dyndns.org>
Junio C Hamano venit, vidit, dixit 25.02.2011 20:16:
Show 6 quoted lines
> Michael J Gruber <git@drmicha.warpmail.net> writes:
> 
>> It comes before Jeff's series from p^3u which refactors add/commit and
>> implements "commit -A".
> 
> What's that topic, and what's p^3u?
p^3u = ppp = proposed potential pu (or something)
Sorry for the TeX notation.

In "Re: Why doesn't git commit -a track new files" (which I failed to reference from this series), Jeff and I have been discussing how to make the add-related options of add and commit homogeneous and less surprising (see the OP). Nobody objected there, so I assumed everyone to agree... The two problems addressed here are:

- "add -u" and "commit -a" are "the same" (as far as additions go, and
when used without pathspec) but are named differently
- "add --all" and "commit --all" are named the same but do different
things (-A resp. -a).
I care about consistency, not so much about actual names.

I don't think we use upper case long options, or I would have suggested "--All" as long form of "-A".

You see, "commit --all" seems to promise more than it does - one really has to know what "all" is qualified by.

And, similarly, "add" always updates the index, it always is about the updates in the files which are selected, so "-u/--update" doesn't make much sense to distinguish it from other uses of "add". That's the reasoning that lead us to having "-a = -u" for add, and that lead me to renaming "-a = --all" to "-a = --tracked". I wouldn't mind "--all-tracked" here. and I would have left it and renamed "-A = --all" to "-A = --foo" if I had had a good "--foo".

Michael
Previous: Junio C HamanoNext: Michael J Gruber
Message 8 of 30 in “add/commit -u/-a/-A”
  1. 0/3 add/commit -u/-a/-AMichael J Gruber, Feb 25, 2011
  2. 1/3 git-add: make -A description clearer vs. -uMichael J Gruber, Feb 25, 2011
  3. Junio C HamanoFeb 25, 2011
  4. 2/3 git-commit: rename --all to --trackMichael J Gruber, Feb 25, 2011
  5. Junio C HamanoFeb 25, 2011
  6. 3/3 git-add: rename -u to -aMichael J Gruber, Feb 25, 2011
  7. Junio C HamanoFeb 25, 2011
  8. Michael J GruberFeb 26, 2011
  9. 0/3 add/commit -u/-a/-AMichael J Gruber, Feb 27, 2011
  10. 1/3 git-add: make -A description clearer vs. -uMichael J Gruber, Feb 27, 2011
  11. Junio C HamanoFeb 27, 2011
  12. 2/3 git-commit: rename --all to --all-trackedMichael J Gruber, Feb 27, 2011
  13. 3/3 git-add: rename -u to -aMichael J Gruber, Feb 27, 2011
  14. Nguyen Thai Ngoc DuyFeb 27, 2011
  15. Junio C HamanoFeb 28, 2011
  16. Michael J GruberFeb 28, 2011
  17. Miles BaderFeb 28, 2011
  18. Michael J GruberFeb 28, 2011
  19. Miles BaderFeb 28, 2011
  20. Snipping on this list (Was: Re: [PATCHv2 3/3] git-add: rename -u to -a)Michael J Gruber, Feb 28, 2011
  21. Junio C HamanoFeb 28, 2011
  22. Miles BaderFeb 28, 2011
  23. Michael J GruberFeb 28, 2011
  24. Matthieu MoyFeb 28, 2011
  25. Michael J GruberFeb 28, 2011
  26. Tor ArntsenFeb 28, 2011
  27. Michael J GruberFeb 28, 2011
  28. Matthieu MoyFeb 28, 2011
  29. Michael J GruberFeb 28, 2011
  30. Junio C HamanoFeb 28, 2011

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.