git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Nanako Shiraishi <nanako3@lavabit.com>
Cc: Michael J Gruber <git@drmicha.warpmail.net>,
	Jonathan Nieder <jrnieder@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, "J. Bruce Fields" <bfields@fieldses.org>,
	Hannu Koivisto <azure@iki.fi>, Jeff King <peff@peff.net>,
	Wincent Colaiuta <win@wincent.com>,
	Matthias Lederhofer <matled@gmx.net>
Subject: Re: [PATCH v2 0/2] user-manual: new "getting started" section
Date: Tue, 17 Nov 2009 00:52:37 +0200	[thread overview]
Message-ID: <94a0d4530911161452xe82858el322a1985341bf13c@mail.gmail.com> (raw)
In-Reply-To: <20091114060600.6117@nanako3.lavabit.com>

On Fri, Nov 13, 2009 at 11:06 PM, Nanako Shiraishi <nanako3@lavabit.com> wrote:
> 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.

> 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

  reply	other threads:[~2009-11-16 22:53 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-24  9:44 [PATCH v2 0/2] user-manual: new "getting started" section Felipe Contreras
2009-10-24  9:44 ` [PATCH v2 1/2] user-manual: add global config section Felipe Contreras
2009-10-24  9:44 ` [PATCH v2 2/2] user-manual: simplify the user configuration Felipe Contreras
2009-10-24 13:06 ` [PATCH v2 0/2] user-manual: new "getting started" section Nanako Shiraishi
2009-10-24 14:08   ` Felipe Contreras
2009-10-24 14:14     ` Björn Steinbrink
2009-10-24 14:22       ` Felipe Contreras
2009-10-24 17:51 ` Junio C Hamano
2009-10-24 18:19   ` Junio C Hamano
2009-10-24 20:16     ` Felipe Contreras
2009-10-25  0:26       ` J. Bruce Fields
2009-10-25  3:08       ` Junio C Hamano
2009-10-25  9:43         ` Felipe Contreras
2009-10-25 11:14           ` Jonathan Nieder
2009-11-11 23:15             ` Felipe Contreras
2009-11-12 11:29               ` Michael J Gruber
2009-11-12 20:04                 ` Felipe Contreras
2009-11-13 21:06                 ` Nanako Shiraishi
2009-11-16 22:52                   ` Felipe Contreras [this message]
2009-11-17 12:06                     ` Nanako Shiraishi
2009-11-17 17:28                       ` J. Bruce Fields
2009-11-17 18:25                         ` Junio C Hamano
2009-11-17 22:00                           ` Felipe Contreras
2009-11-17 22:19                             ` Junio C Hamano
2009-11-17 23:06                               ` Felipe Contreras
2009-11-17 23:13                                 ` Junio C Hamano
2009-11-18  0:05                                   ` Felipe Contreras
2009-11-17 17:53                       ` Matthieu Moy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=94a0d4530911161452xe82858el322a1985341bf13c@mail.gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=azure@iki.fi \
    --cc=bfields@fieldses.org \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=matled@gmx.net \
    --cc=nanako3@lavabit.com \
    --cc=peff@peff.net \
    --cc=win@wincent.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).