Re: [PATCH] Implement git-staged, an alias for 'git diff --cached'.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <git@...>
Cc: Teemu Likonen <tlikonen@...>, Wincent Colaiuta <win@...>, Johannes Schindelin <Johannes.Schindelin@...>, David Symonds <dsymonds@...>, <gitster@...>, Jeff King <peff@...>
Date: Wednesday, October 29, 2008 - 4:24 pm

Teemu Likonen <tlikonen@iki.fi> writes:


One irregularity hear is that there is no way to explicitly say what
you want to compare against the index (the staging area).  Diff
compares two things to each other, and a more regular and general way
to express what it does would be something like

    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)

To me, it isn't obvious that --cached changes the thing you *compare*
rather than the thing you compare *against*.  I think it would be
useful to have a way of explicitly stating what you compare, something
like what I wrote above, and then having useful shortcuts for common
cases (like that no arguments compares the work tree against the
stage).

-- 
David Kågedal

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] Implement git-staged, an alias for 'git diff --c..., David Kågedal, (Wed Oct 29, 4:24 pm)