Re: [RFC/PATCH 0/2] New 'stage' command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, 7 Apr 2009, Felipe Contreras wrote:

> On Mon, Apr 6, 2009 at 10:25 PM, Björn Steinbrink <B.Steinbrink@xxxxxx> wrote:
> > On 2009.04.06 22:13:26 +0300, Felipe Contreras wrote:
> >> On Mon, Apr 6, 2009 at 9:30 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> >> > David Kågedal <davidk@xxxxxxxxxxxxxx> writes:
> >> >
> >> >> What do you mean? This was a suggestion for how git diff should
> >> >> work. I fail to see how you would need a WORKTREEANDTHEINDEX there.
> >> >
> >> > You are talking only about "git diff".  I am talking about the whole git
> >> > suite, because you have to worry about how such a proposal would affect
> >> > other parts of the UI.
> >>
> >> How do currently do you something like this:
> >> git diff HEAD^..STAGE
> >
> > git diff --cached HEAD^
> >
> > The "hard" (and pretty weird) one would be "git diff STAGE..HEAD^",
> > which is:
> >
> > git diff -R --cached HEAD^
> 
> Sorry, that's what I meant.
> 
> So it's possible, but completely unintuitive, and different from other
> use cases.

At least it is consistent.

You are always able to say "-R" if you want to have the reverse diff, this 
is commonly known from GNU diff and other diff implementations.

Also, "git diff --cached" is _only_ a shortcut for "git diff --cached 
HEAD".  This is yet another proof that you should not teach the shortcuts 
first, it _harms_ understanding.

Ciao,
Dscho

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]