From: "Avery Pennarun" <apenwarr@gmail.com>
To: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Cc: "Jeff King" <peff@peff.net>, "Junio C Hamano" <gitster@pobox.com>,
"Björn Steinbrink" <B.Steinbrink@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 10:46:50 -0500 [thread overview]
Message-ID: <32541b130811120746m7b0eadd3y1240d1252dbd441d@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0811121205100.30769@pacific.mpi-cbg.de>
On Wed, Nov 12, 2008 at 6:10 AM, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
> Just in case anybody thought about creating tree objects on the fly and
> use their SHA-1s: that won't fly, as you can have unmerged entries in the
> index. So STAGED.. is a _fundamentally_ different thing from HEAD^..
Hmm, I tried it to see, and "git diff --cached branchname" when there
are unmerged entries looks like this (one line):
* Unmerged path /whatever/file
Which is pretty unhelpful anyhow (although I don't know what would be
better). I can think of several ways to produce the same output,
including using a magic SHA-1 that means "unmerged", or using a
different filemode for unmerged files in the tree object, or actually
including all three versions of the file in the tree object, each with
a different mode. I admit that sounds pretty gross, though.
> Maybe we could play tricks with a special staged_commit (pretending to be
> a commit with SHA-1 000000... so that git log STAGED.. would do the same
> as plain git log, the rationale being that STAGED is no commit, so ^STAGED
> should be a nop).
I might have imagined STAGED to be a child commit of HEAD (or rather,
its parents should be the same as if you did 'git commit'), but I
don't really know for sure. In such a case, ^STAGED would definitely
have a meaning.
Have fun,
Avery
prev parent reply other threads:[~2008-11-12 15:48 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
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 [this message]
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=32541b130811120746m7b0eadd3y1240d1252dbd441d@mail.gmail.com \
--to=apenwarr@gmail.com \
--cc=B.Steinbrink@gmx.de \
--cc=Johannes.Schindelin@gmx.de \
--cc=dsymonds@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--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.
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).