From: Mike Hommey Date: Sat, 24 Apr 2010 15:11:03 GMT Subject: Re: 'commit -a' safety Message-ID: <20100424151103.GA19272@glandium.org> In-Reply-To: <20100424142848.GA4461@gnu.kitenet.net> On Sat, Apr 24, 2010 at 10:28:48AM -0400, Joey Hess wrote: > Jakub Narebski wrote: > > What you cant recover by undoing commit is the state of index before > > accidental 'git commit -a' instead of 'git commit'. > > Has a reflog equivilant for the index, to allow resetting it to a > previous state, ever been discussed? > > I don't grok its data structure -- could that be done efficiently? Updating the index creates blobs, so the file states are definitely already kept. What is missing is trees that could be referred to by a log. Mike