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

Re: [PATCH v2 0/2] user-manual: new "getting started" section

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Nov 16, 2009, 22:52 UTC
Message-ID
<94a0d4530911161452xe82858el322a1985341bf13c@mail.gmail.com>
In-Reply-To
<20091114060600.6117@nanako3.lavabit.com>
On Fri, Nov 13, 2009 at 11:06 PM, Nanako Shiraishi <nanako3@lavabit.com> wrote:
Show 18 quoted lines
> Quoting Michael J Gruber <git@drmicha.warpmail.net>
>> If you care to go back to that discussion you see that there is good
>> reason for having both --cached and --index. They are different. "git
>> help cli" explains this nicely.
>
> The need to support both options in the same command (eg. apply) means
> that anybody who says "I don't like 'index' nor 'cache'; why don't we
> change them all to 'stage'" doesn't understand the issue.
>
> But that doesn't mean "apply --cached" vs "apply --index" is the best
> way to let the users specify which operation is requested. I don't
> think Felipe seriously wants to change them to --gogo vs --dance, but
> if he made a more constructive proposal, instead of making such a
> comment whose intended effect is only to annoy people, we may see
> an improved UI at the end.  Proposing "--index-only" vs "--index-too"
> or even "--stage-only" vs "--stage-too" would have helped him appear
> to be more serious and constructive and I think your expression
> "mismatching participants" was a great way to say this.

Right, your explanation is more clear: the fact that we need both doesn't mean we cannot use the term "stage". As to "constructive proposal" I deliberately tried to avoid them in case somebody tried to disregard it as bike-shedding, and move on. What I'm trying to do is bring up the issue that the stage is not user friendly.

Show 34 quoted lines
> There was a similar discussion about "diff --cached". The command
> compares two things and the current syntax relies on counting the
> number of treeish on the command line to specify what these two things
> are, and sometimes people are confused which way the comparison occurs.
>
>  * If you have two treeish, it compares the two treeish. Specifically,
>   it shows the change to make one treeish into the other treeish.
>
>  * If you have one treeish, it compares the treeish with working tree
>   or the index (it shows the change to make the treeish into working
>   tree or the index). You need --cached to choose the "index", and
>   this can safely be aliased to --staged.
>
>  * If you have zero treeish, it compares the index with working tree
>   (it shows the change to make the index into working tree).
>
> But it is also possible to have an alternate syntax to explicitly say
> what you are comparing with what. Perhaps these may make it unnecessary
> to remember which way the comparison occurs:
>
>  git diff --tree-vs-staged HEAD
>        same as "git diff --cached HEAD"
>  git diff --staged-vs-tree HEAD
>        same as "git diff -R --cached HEAD"
>
>  git diff --staged-vs-working
>        same as "git diff"
>  git diff --working-vs-staged
>        same as "git diff -R"
>
>  git diff --tree-vs-working HEAD
>        same as "git diff HEAD"
>  git diff --working-vs-tree HEAD
>        same as "git diff -R HEAD"

I like David Kågedal's suggestion more: http://kerneltrap.org/mailarchive/git/2008/10/29/3857134

Cheers.
-- 
Felipe Contreras
Previous: Nanako ShiraishiNext: Nanako Shiraishi
Message 19 of 28 in “user-manual: new "getting started" section”
  1. 0/2 user-manual: new "getting started" sectionFelipe Contreras, Oct 24, 2009
  2. 1/2 user-manual: add global config sectionFelipe Contreras, Oct 24, 2009
  3. 2/2 user-manual: simplify the user configurationFelipe Contreras, Oct 24, 2009
  4. Nanako ShiraishiOct 24, 2009
  5. Felipe ContrerasOct 24, 2009
  6. Björn SteinbrinkOct 24, 2009
  7. Felipe ContrerasOct 24, 2009
  8. Junio C HamanoOct 24, 2009
  9. Junio C HamanoOct 24, 2009
  10. Felipe ContrerasOct 24, 2009
  11. J. Bruce FieldsOct 25, 2009
  12. Junio C HamanoOct 25, 2009
  13. Felipe ContrerasOct 25, 2009
  14. Jonathan NiederOct 25, 2009
  15. Felipe ContrerasNov 11, 2009
  16. Michael J GruberNov 12, 2009
  17. Felipe ContrerasNov 12, 2009
  18. Nanako ShiraishiNov 13, 2009
  19. Felipe ContrerasNov 16, 2009
  20. Nanako ShiraishiNov 17, 2009
  21. J. Bruce FieldsNov 17, 2009
  22. Junio C HamanoNov 17, 2009
  23. Felipe ContrerasNov 17, 2009
  24. Junio C HamanoNov 17, 2009
  25. Felipe ContrerasNov 17, 2009
  26. Junio C HamanoNov 17, 2009
  27. Felipe ContrerasNov 18, 2009
  28. Matthieu MoyNov 17, 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.