From: Michael J Gruber <git@drmicha.warpmail.net>
To: Git Mailing List <git@vger.kernel.org>
Cc: Christian Couder <chriscool@tuxfamily.org>
Subject: git replace woes: dirty stat with clean workdir
Date: Tue, 10 Nov 2009 17:21:12 +0100 [thread overview]
Message-ID: <4AF992F8.8010309@drmicha.warpmail.net> (raw)
Hi there,
when cooking up a "warning example" for git replace (don't draw
premature conclusions when there are replaced objects) I came across the
following problem: git status seems to compare the work dir with the
tree of HEAD, not the replacing tree. Even deleting the index does not help.
[ The example also shows that we need a way to specify
--no-replace-objects for gitk. Would easier if gitk really where git
something. ]
Michael
#!/bin/sh
rm -Rf rtest &&
mkdir rtest &&
cd rtest &&
git init &&
echo > comment &&
git add comment &&
git commit -m "empty comment" &&
echo nice > "comment" &&
git commit -am "nice comment" &&
echo ugly > "comment" &&
git commit -am "to be discarded" &&
git replace HEAD^^{tree} HEAD^{tree} &&
git reset --hard HEAD^ &&
git log -p &&
git st
next reply other threads:[~2009-11-10 16:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-10 16:21 Michael J Gruber [this message]
2009-11-10 23:33 ` git replace woes: dirty stat with clean workdir Christian Couder
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=4AF992F8.8010309@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
/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).