{"thread":{"id":"33053","subject":"[BUG?] am --abort on null cache entries fails","startedAt":"2013-03-02T00:52:16Z","lastAt":"2013-03-02T00:57:05Z","messageCount":2,"participants":["Stephen Boyd","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"210497","messageId":"51314D40.9030209@codeaurora.org","threadId":"33053","inReplyTo":null,"subject":"[BUG?] am --abort on null cache entries fails","fromName":"Stephen Boyd","fromEmail":"sboyd@codeaurora.org","sentAt":"2013-03-02T00:52:16Z","receivedAt":"2013-03-02T00:52:16Z","isPatch":false,"sender":{"key":"bebarino@gmail.com","avatar":"https://avatars.githubusercontent.com/u/38832?v=4"},"body":"Hi,\n\nI was trying git am -3 with a patch that touched files that didn't exist\nin the branch I was on. Obviously it failed badly, so I wanted to abort\nout of the git am state with git am --abort. Unfortunately, it seems\nthat git am --abort in this scenario fails with this error:\n\nerror: cache entry has null sha1: <non-existant-file>\n\nand then leaves the file in my working tree untracked. This didn't used\nto happen, so I bisected it down to this commit\n\ncommit 4337b5856f88f18da47c176e3cbc95a35627044c\nAuthor: Jeff King <peff@peff.net>\nDate: Sat Jul 28 11:05:24 2012 -0400\ndo not write null sha1s to on-disk index\n\nWhich definitely introduced that error message. How do we fix this?\n\n-- \nQualcomm Innovation Center, Inc. is a member of Code Aurora Forum,\nhosted by The Linux Foundation\n"},{"id":"210499","messageId":"20130302005705.GB15836@sigill.intra.peff.net","threadId":"33053","inReplyTo":"51314D40.9030209@codeaurora.org","subject":"Re: [BUG?] am --abort on null cache entries fails","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2013-03-02T00:57:05Z","receivedAt":"2013-03-02T00:57:05Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Mar 01, 2013 at 04:52:16PM -0800, Stephen Boyd wrote:\n\n> I was trying git am -3 with a patch that touched files that didn't exist\n> in the branch I was on. Obviously it failed badly, so I wanted to abort\n> out of the git am state with git am --abort. Unfortunately, it seems\n> that git am --abort in this scenario fails with this error:\n> \n> error: cache entry has null sha1: <non-existant-file>\n> \n> and then leaves the file in my working tree untracked. This didn't used\n> to happen, so I bisected it down to this commit\n> \n> commit 4337b5856f88f18da47c176e3cbc95a35627044c\n> Author: Jeff King <peff@peff.net>\n> Date: Sat Jul 28 11:05:24 2012 -0400\n> do not write null sha1s to on-disk index\n> \n> Which definitely introduced that error message.\n\nYep. It's a bug, but that commit does not introduce it; it actually just\nnotices the bug earlier.\n\n> How do we fix this?\n\nSee this thread for the current discussion and some possible fixes:\n\n  http://thread.gmane.org/gmane.comp.version-control.git/217172\n\n-Peff\n"}]}