From: Torsten Krah Date: Wed, 08 Jan 2020 12:42:14 GMT Subject: Re: Broken branch after git commit - tracked files in staging area can't be removed with restore --staged, or commit or stash Message-ID: <654cc7a58cf6947f91478411dd6a3f7f3473bc67.camel@gmail.com> In-Reply-To: <20200108104008.GA2207365@coredump.intra.peff.net> Am Mittwoch, den 08.01.2020, 05:40 -0500 schrieb Jeff King: > So there seem to be at least two bugs: > > - git-restore doesn't properly invalidate the cache-tree > > - the index-reading code is not careful enough about bogus cache- > trees, > and may segfault > > -Peff -- Hi Peff, thanks for confirming those bugs and taking a look at my report itself even before I've put the small reproducer recipe. I don't need to take any other actions or create tickets somewhere else now to get those fixed, you're driving this from here, right? Another question - how can I fix my broken original branch where this bug did hit me which is in that "bogus" state now to get back to the "original" commit made so I can remove my unwanted files with "git reset HEAD " instead of git-restore in the meantime (tried your rm .git/index variant but after that I had files which were already in the branch shown as unversioned after that, so that did not work very well for me)? kind regards Torsten