From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [RFH] "git reset --hard" broken???
Date: Mon, 1 Jul 2013 17:47:56 -0400 [thread overview]
Message-ID: <20130701214756.GA13962@sigill.intra.peff.net> (raw)
In-Reply-To: <7vli5qezqj.fsf@alter.siamese.dyndns.org>
On Mon, Jul 01, 2013 at 02:28:52PM -0700, Junio C Hamano wrote:
> I have no time to dig this down, but I just noticed this by accident:
>
> $ make
> $ cd t
> $ sh ./t7011-skip-worktree-reading.sh -d
> $ cd trash*.t7011*
> $ git reset --hard HEAD
> error: Entry '1' not uptodate. Cannot merge.
> fatal: Could not reset index file to revision 'HEAD'.
>
> which looks quite bogus. "reset --hard" is meant to be the last
> resort "no matter what, please match the working tree to the commit"
> and should not ever error out with "not uptodate Cannot merge"
> message.
Yeah, I would agree. I do not think this is a new breakage. It behaves
the same way all the way back to v1.7.0 (the first commit with t7011).
Trying to go back further (by snapshotting the state of the trash
directory and just running the reset on it) doesn't work, as older
versions do not understand the skip-worktree bit.
I'm not sure yet if it's just a problem with skip-worktree entries, or
if you can trigger the problem another way, though.
-Peff
prev parent reply other threads:[~2013-07-01 21:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-01 21:28 [RFH] "git reset --hard" broken??? Junio C Hamano
2013-07-01 21:47 ` 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=20130701214756.GA13962@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).