All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Aguilar <davvid@gmail.com>
To: Sverre Rabbelier <srabbelier@gmail.com>
Cc: markus.heidelberg@web.de,
	Felipe Contreras <felipe.contreras@gmail.com>,
	git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [RFC/PATCH 0/2] New 'stage' command
Date: Sun, 5 Apr 2009 20:24:58 -0700	[thread overview]
Message-ID: <20090406032457.GA14758@gmail.com> (raw)
In-Reply-To: <fabb9a1e0904051622k66352ea4v542ecd99bd5d9c6@mail.gmail.com>

On  0, Sverre Rabbelier <srabbelier@gmail.com> wrote:
> Heya,
> 
> On Mon, Apr 6, 2009 at 01:17, Markus Heidelberg
> <markus.heidelberg@web.de> wrote:
> > Felipe Contreras, 06.04.2009:
> >> But actually, "git diff --cached" is a
> >> different action; you can't do "git diff --cached HEAD^.." for
> >> example.
> >
> > And I neither could I do "git stage diff HEAD^.."
> 
> I rest my case ;). That's the whole point Felipe is trying to make here.
> $ git diff --cached
> $ git diff HEAD^..
> 
> That's two different modes of operation with the only difference being
> a switch ('--cached'), which changes what is, and what is not valid
> after that.
> 
> Whereas with
> $ git stage diff
> 
> There is no confusion that 'HEAD^..' is not a valid argument, as there
> is no command in 'git stage diff' to which it _is_ a valid argument.

Hello

Here's an interesting email from a while back:

http://kerneltrap.org/mailarchive/git/2008/10/29/3857134

The above mentions the following suggestion:

    git diff STAGE WORKTREE   (like "git diff" today)
    git diff HEAD WORKTREE    (like "git diff HEAD" today)
    git diff WORKTREE HEAD    (like "git diff -R HEAD" today)
    git diff HEAD STAGE       (like "git diff --cached" today)
    git diff commit STAGE     (like "git diff --cached commit" today)


>From a consistency and usability perspective, the above
example seems very appealing because:

a) it does not introduce any new commands, and

b) it is consistent with the way git-diff's command-line
   interface works today.

All we'd have to do is teach git-diff to special-case
'STAGE' and 'WORKTREE'.  Now, whether we'd want to do
that is a completely different discussion, but I figured I'd
throw the old thread out there.


-- 

	David

  parent reply	other threads:[~2009-04-06  3:26 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
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 [this message]
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=20090406032457.GA14758@gmail.com \
    --to=davvid@gmail.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=markus.heidelberg@web.de \
    --cc=srabbelier@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.