All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG?] am --abort on null cache entries fails
@ 2013-03-02  0:52 Stephen Boyd
  2013-03-02  0:57 ` Jeff King
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Boyd @ 2013-03-02  0:52 UTC (permalink / raw)
  To: git; +Cc: Jeff King

Hi,

I was trying git am -3 with a patch that touched files that didn't exist
in the branch I was on. Obviously it failed badly, so I wanted to abort
out of the git am state with git am --abort. Unfortunately, it seems
that git am --abort in this scenario fails with this error:

error: cache entry has null sha1: <non-existant-file>

and then leaves the file in my working tree untracked. This didn't used
to happen, so I bisected it down to this commit

commit 4337b5856f88f18da47c176e3cbc95a35627044c
Author: Jeff King <peff@peff.net>
Date: Sat Jul 28 11:05:24 2012 -0400
do not write null sha1s to on-disk index

Which definitely introduced that error message. How do we fix this?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [BUG?] am --abort on null cache entries fails
  2013-03-02  0:52 [BUG?] am --abort on null cache entries fails Stephen Boyd
@ 2013-03-02  0:57 ` Jeff King
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff King @ 2013-03-02  0:57 UTC (permalink / raw)
  To: Stephen Boyd; +Cc: git

On Fri, Mar 01, 2013 at 04:52:16PM -0800, Stephen Boyd wrote:

> I was trying git am -3 with a patch that touched files that didn't exist
> in the branch I was on. Obviously it failed badly, so I wanted to abort
> out of the git am state with git am --abort. Unfortunately, it seems
> that git am --abort in this scenario fails with this error:
> 
> error: cache entry has null sha1: <non-existant-file>
> 
> and then leaves the file in my working tree untracked. This didn't used
> to happen, so I bisected it down to this commit
> 
> commit 4337b5856f88f18da47c176e3cbc95a35627044c
> Author: Jeff King <peff@peff.net>
> Date: Sat Jul 28 11:05:24 2012 -0400
> do not write null sha1s to on-disk index
> 
> Which definitely introduced that error message.

Yep. It's a bug, but that commit does not introduce it; it actually just
notices the bug earlier.

> How do we fix this?

See this thread for the current discussion and some possible fixes:

  http://thread.gmane.org/gmane.comp.version-control.git/217172

-Peff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-02  0:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-02  0:52 [BUG?] am --abort on null cache entries fails Stephen Boyd
2013-03-02  0:57 ` Jeff King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.