git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: markus.heidelberg@web.de
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [RFC/PATCH 0/2] New 'stage' command
Date: Mon, 6 Apr 2009 01:35:24 +0300	[thread overview]
Message-ID: <94a0d4530904051535v8bd901fsedecdf61bc4acb33@mail.gmail.com> (raw)
In-Reply-To: <200904052358.53028.markus.heidelberg@web.de>

On Mon, Apr 6, 2009 at 12:58 AM, Markus Heidelberg
<markus.heidelberg@web.de> wrote:
> Felipe Contreras, 05.04.2009:
>> For example 'git stage diff' is more natural (at least to me) than 'git diff
>> --cached', same goes for 'git stage rm foo.c' vs 'git rm --cached foo.c'.
>
> Not for me. If I want to GET a diff, I want to use a command "diff", so
> "git diff" is more obvious.
> The next step is to say WHAT exactly to diff. Therefor options to the
> "diff" command are more logically to me from a hierarchic POV. And here
> I don't think options like "--cached" or "sha1..sha2", despite having
> different style, make any difference.

Well, it's a matter of preference, and you would not loose the option
to do it the way you like. But actually, "git diff --cached" is a
different action; you can't do "git diff --cached HEAD^.." for
example.

Consider "git rm foo.c" vs "git rm --cached foo.c"... both commands
are removing a file, the only difference is that one is removing from
the staging area while the other is removing it from the working
directory. Now think about "git branch -d bar", following the "first I
specify the action, and then the object" thinking, would it make sense
to have "git rm --branch bar"? Probably not; if you want to do stuff
with branches, you use "git branch", similarly, if you want to do
stuff with the staging area, why not use "git stage"?

-- 
Felipe Contreras

  reply	other threads:[~2009-04-05 22:37 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-05 13:48 [RFC/PATCH 0/2] New 'stage' command Felipe Contreras
2009-04-05 13:48 ` [RFC/PATCH 1/2] git: remote stage Felipe Contreras
2009-04-05 13:48   ` [RFC/PATCH 2/2] Add new 'git stage' script Felipe Contreras
2009-04-05 19:02 ` [RFC/PATCH 0/2] New 'stage' command Junio C Hamano
2009-04-05 19:28   ` Felipe Contreras
2009-04-05 19:33     ` Junio C Hamano
2009-04-05 19:59       ` Junio C Hamano
2009-04-05 20:41         ` Felipe Contreras
2009-04-05 20:55           ` Jay Soffian
2009-04-05 22:06             ` Felipe Contreras
2009-04-05 19:34     ` [RFC/PATCH 0/2] " Nicolas Sebrecht
2009-04-05 21:58 ` [RFC/PATCH 0/2] " Markus Heidelberg
2009-04-05 22:35   ` Felipe Contreras [this message]
2009-04-05 23:06     ` Björn Steinbrink
2009-04-05 23:23       ` Markus Heidelberg
2009-04-06  9:48         ` Björn Steinbrink
2009-04-05 23:17     ` Markus Heidelberg
2009-04-05 23:22       ` Sverre Rabbelier
2009-04-05 23:45         ` Johannes Schindelin
2009-04-06  9:37           ` Felipe Contreras
2009-04-06  3:24         ` David Aguilar
2009-04-06  5:17           ` Junio C Hamano
2009-04-06  5:53             ` David Aguilar
2009-04-06  6:18               ` Junio C Hamano
2009-04-06 13:20             ` David Kågedal
2009-04-06 13:42               ` David Kågedal
2009-04-06 18:30               ` Junio C Hamano
2009-04-06 19:13                 ` Felipe Contreras
2009-04-06 19:25                   ` Björn Steinbrink
2009-04-07 10:01                     ` Felipe Contreras
2009-04-07 12:45                       ` Johannes Schindelin
2009-04-06 20:49                 ` Matthieu Moy
2009-04-07  0:55                   ` Junio C Hamano
     [not found]                 ` <87skkligzb.fsf@krank.kagedal.org>
2009-04-07  1:02                   ` Junio C Hamano
2009-04-07  8:39                     ` Octavio Alvarez
     [not found]                       ` <878wmcj1fs.fsf@krank.kagedal.org>
2009-04-07 15:01                         ` Octavio Alvarez
2009-04-07  1:36                 ` Stefan Karpinski
2009-04-07  7:38                 ` Octavio Alvarez

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=94a0d4530904051535v8bd901fsedecdf61bc4acb33@mail.gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=markus.heidelberg@web.de \
    /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).