From: Jeff King <peff@peff.net>
To: Avery Pennarun <apenwarr@gmail.com>
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Björn Steinbrink" <B.Steinbrink@gmx.de>,
"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
"David Symonds" <dsymonds@gmail.com>,
git@vger.kernel.org, "Stephan Beyer" <s-beyer@gmx.net>
Subject: Re: [PATCH] git-diff: Add --staged as a synonym for --cached.
Date: Wed, 12 Nov 2008 03:33:53 -0500 [thread overview]
Message-ID: <20081112083353.GB3817@coredump.intra.peff.net> (raw)
In-Reply-To: <32541b130811102004n54a47331v48ba8d299039897f@mail.gmail.com>
On Mon, Nov 10, 2008 at 11:04:42PM -0500, Avery Pennarun wrote:
> Speaking just for myself, I would find this all a lot less confusing
> if "staged" were a refspec of some sort, not an option at all.
>
> git diff HEAD..STAGED
> git diff STAGED..WORKTREE
> git grep pattern STAGED HEAD sillybranch WORKTREE ^ignorebranch --
> path/to/files
I agree that such a thing is reasonably intuitive. I have thought about
"magic" refspecs before; my local git has an "EMPTY" refspec which
points to the empty tree for diffing. However, that was trivial to
implement (since it turns into a sha1), and yours is very hard (since
you will have to pass these "pretend" objects around).
So I think it is a neat idea, but I am not volunteering to work on it.
:)
-Peff
next prev parent reply other threads:[~2008-11-12 8:35 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 16:15 [PATCH] git-diff: Add --staged as a synonym for --cached David Symonds
2008-10-29 16:42 ` Jeff King
2008-10-29 16:50 ` David Symonds
2008-10-29 17:06 ` Johannes Schindelin
2008-10-29 17:11 ` Jeff King
2008-11-02 8:30 ` Junio C Hamano
2008-11-03 7:04 ` Jeff King
2008-11-02 12:35 ` Björn Steinbrink
2008-11-02 18:30 ` Junio C Hamano
2008-11-02 18:54 ` Björn Steinbrink
2008-11-03 7:14 ` Jeff King
2008-11-10 23:37 ` David Symonds
2008-11-11 0:15 ` Jeff King
2008-11-11 1:11 ` Junio C Hamano
2008-11-11 1:22 ` Jeff King
2008-11-12 0:57 ` Junio C Hamano
2008-11-11 4:04 ` Avery Pennarun
2008-11-11 5:49 ` Miles Bader
2008-11-12 8:33 ` Jeff King [this message]
2008-11-12 11:10 ` Johannes Schindelin
2008-11-12 11:06 ` Jeff King
2008-11-12 15:39 ` Avery Pennarun
2008-11-12 19:15 ` Jeff King
2008-11-12 19:29 ` Junio C Hamano
2008-11-12 19:37 ` Jeff King
2008-11-12 19:57 ` Junio C Hamano
2008-11-12 22:39 ` Avery Pennarun
2008-11-12 23:42 ` Junio C Hamano
2008-11-12 15:46 ` Avery Pennarun
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081112083353.GB3817@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=B.Steinbrink@gmx.de \
--cc=Johannes.Schindelin@gmx.de \
--cc=apenwarr@gmail.com \
--cc=dsymonds@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=s-beyer@gmx.net \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).