From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Rhodes, Kate" <masukomi@gmail.com>, git@vger.kernel.org
Subject: Re: [Bug] git add -i fails in multiple ways prior to first commit.
Date: Wed, 13 Feb 2008 06:34:18 -0500 [thread overview]
Message-ID: <20080213113418.GA2736@coredump.intra.peff.net> (raw)
In-Reply-To: <7v63wtqejf.fsf@gitster.siamese.dyndns.org>
On Wed, Feb 13, 2008 at 03:30:44AM -0800, Junio C Hamano wrote:
> > However, I wonder if this is the best approach. It would be nice if
> > there were a shorthand for "the empty tree" for diffing, so you could
> > just diff against that rather than HEAD, and have the regular plumbing
> > generate.
>
> I guess you can set your worktree to an empty directory and run
> diff-files backwards, like perhaps:
>
> mkdir /var/tmp/empty
> (cd .git && GIT_WORK_TREE=/var/tmp/empty git diff -R)
>
> Have I tried it? No --- I am not sick enough to be motivated.
Actually, I thought of that already. It does work, though when I tried
it, I failed to 'cd .git' which broke it. But yes, I think it is a
nastier solution than just using the "virtual" empty tree.
-Peff
prev parent reply other threads:[~2008-02-13 11:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-12 0:59 [Bug] git add -i fails in multiple ways prior to first commit Rhodes, Kate
2008-02-13 10:16 ` Jeff King
2008-02-13 10:23 ` Jakub Narebski
2008-02-13 10:37 ` Jeff King
2008-02-13 10:50 ` [PATCH] add--interactive: handle initial commit better Jeff King
2008-02-13 11:25 ` Jeff King
2008-02-13 12:19 ` Johannes Schindelin
2008-02-13 13:11 ` Jakub Narebski
2008-02-13 13:15 ` Jeff King
2008-02-13 13:22 ` Johannes Schindelin
2008-02-13 13:45 ` Johannes Schindelin
2008-02-13 11:30 ` [Bug] git add -i fails in multiple ways prior to first commit Junio C Hamano
2008-02-13 11:34 ` Jeff King [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=20080213113418.GA2736@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=masukomi@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 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).