git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re* [BUG?] "error: cache entry has null sha1"

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 1, 2013, 22:44 UTC
Message-ID
<1383345895-23341-1-git-send-email-gitster@pobox.com>
In-Reply-To
<20131031172116.GA19428@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 24 quoted lines
> On Thu, Oct 31, 2013 at 01:15:39PM -0400, Jeff King wrote:
>
>> On Thu, Oct 31, 2013 at 10:11:49AM -0700, Junio C Hamano wrote:
>> 
>> >  - Try to discard
>> > 
>> >    $ git am --abort
>> >    error: cache entry has null sha1: remote-curl.c
>> >    fatal: unable to write new index file
>> > 
>> >    This should not happen, no?
>> > 
>> > "git reset --hard" will remove the funnies, but still...
>> 
>> I ran into this recently, too. Isn't it just the twoway_merge bug we
>> were discussing here:
>> 
>>   http://thread.gmane.org/gmane.comp.version-control.git/202440/focus=212316
>> 
>> I don't think we ever actually applied a fix.
>
> Also, the followup:
>
>   http://thread.gmane.org/gmane.comp.version-control.git/217172

OK, so it appears that we sort of agreed that the pieces of patches in the thread was good at $gmane/217300, but somehow I ended up veering into a tangent from there and forgot about the topic X-<?

Here is a proposed endgame for the topic in a patch form, then.

I've added a test for low-level "read-tree --reset -u A B", and tried the "am --abort" I saw the problem with manually, but other than that, I haven't (re)thought about the issue hard enough to be comfortable with this change yet.

To be applied on top of c479d14, but the result should be mergeable cleanly all the way up to 'pu'.

Jeff King (1):
  unpack-trees: fix "read-tree -u --reset A B" with conflicted index
Junio C Hamano (2):
  t1005: reindent
  t1005: add test for "read-tree --reset -u A B"
 t/lib-read-tree.sh         |  52 ++++++++---------
 t/t1005-read-tree-reset.sh | 141 +++++++++++++++++++++++++--------------------
 unpack-trees.c             |  25 +++++---
 3 files changed, 121 insertions(+), 97 deletions(-)
-- 
1.8.5-rc0-281-g8951339
Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 17 in “remote-curl: fix large pushes with GSSAPI”
  1. remote-curl: fix large pushes with GSSAPIbrian m. carlson, Oct 29, 2013
  2. Jeff KingOct 30, 2013
  3. brian m. carlsonOct 30, 2013
  4. Jeff KingOct 31, 2013
  5. 1/3 http: return curl's AUTHAVAIL via slot_resultsJeff King, Oct 31, 2013
  6. 2/3 remote-curl: pass curl slot_results back through run_slotJeff King, Oct 31, 2013
  7. [BUG?] "error: cache entry has null sha1"Junio C Hamano, Oct 31, 2013
  8. Jeff KingOct 31, 2013
  9. Jeff KingOct 31, 2013
  10. Junio C HamanoOct 31, 2013
  11. Re* [BUG?] "error: cache entry has null sha1"Junio C Hamano, Nov 1, 2013
  12. 1/3 unpack-trees: fix "read-tree -u --reset A B" with conflicted indexJunio C Hamano, Nov 1, 2013
  13. 2/3 t1005: reindentJunio C Hamano, Nov 1, 2013
  14. 3/3 t1005: add test for "read-tree --reset -u A B"Junio C Hamano, Nov 1, 2013
  15. Jeff KingNov 3, 2013
  16. 3/3 remote-curl: fix large pushes with GSSAPIJeff King, Oct 31, 2013
  17. brian m. carlsonOct 31, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.