[RFH] "git reset --hard" broken???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Interestingly, you can do this to work it around, though:

        $ cd t
        $ sh ./t7011-skip-worktree-reading.sh -d
        $ cd trash*.t7011*
	$ git reset
        $ git reset --hard HEAD
        HEAD is now at .... init

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]