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

Re: git blame crashes with internal error

From
Alex Riesen <raa.lkml@gmail.com>
Date
Oct 14, 2007, 17:33 UTC
Message-ID
<20071014173355.GB2776@steel.home>
In-Reply-To
<20071014163702.GA2776@steel.home>
Alex Riesen, Sun, Oct 14, 2007 18:37:02 +0200:
Show 31 quoted lines
> Björn Steinbrink, Sun, Oct 14, 2007 16:36:28 +0200:
> > Hi Junio,
> > 
> > git blame just decided to crash on me, when I tried to use it while
> > resolving a merge conflict. Interesting is probably, that it crashes
> > when given the filename of a file that is not _directly_ affected by the
> > merge, but contains code that originates from a file that caused
> > conlicts.
> > 
> > Error message is:
> > fatal: internal error: ce_mode is 0
> > 
> 
> It is not crashing. It is just not handling unexpected situation
> properly:
> 
>     $ testcase.sh
>     ...
>     Switched to branch "foo"
>     CONFLICT (delete/modify): file1 deleted in HEAD and modified in master. Version master of file1 left in tree.
>     Automatic merge failed; fix conflicts and then commit the result.
>     fatal: internal error: ce_mode is 0
>     $ git ls-files --cached --stage
>     100644 72139f38953679bd19b3a7938c479d73c1aa7b59 1       file1
>     100644 3181f904ce3f9364b08524edd262a7a2ac766c9c 3       file1
>     100644 24e1ea80d6dcc497f60597b2a6d7cf65ecaa958a 0       file2
> 
> See? There is an unresolved merge.
> 
> The question is, what's the problem...
> 
FWIW, backtrace. I'm giving up for today. Anyone?
(gdb) bt
#0  0x080b6ac5 in die_builtin (err=0x80f3b92 "internal error: ce_mode is %o", 
    params=0xbfd91c34 "") at usage.c:24
#1  0x080b6b84 in die (err=0x80f3b92 "internal error: ce_mode is %o")
    at usage.c:76
#2  0x080a3883 in ce_match_stat_basic (ce=0xb7f6a00c, st=0xbfd91cb8)
    at read-cache.c:153
#3  0x080a398f in ie_match_stat (istate=0x81342e0, ce=0xb7f6a00c, 
    st=0xbfd91cb8, options=0) at read-cache.c:208
#4  0x080c87f3 in reuse_worktree_file (name=0x814c698 "file1", 
    sha1=0x814c668 "r\023\2378\2256y�\031��\223\214G\235s�{Y\230�024\b", 
    want_file=0) at diff.c:1499
#5  0x080c8a6f in diff_populate_filespec (s=0x814c668, size_only=1)
    at diff.c:1565
#6  0x080d0ab2 in is_exact_match (src=0x814c668, dst=0x814ca20, contents_too=1)
    at diffcore-rename.c:108
#7  0x080d13aa in diffcore_rename (options=0xbfd91edc) at diffcore-rename.c:335
#8  0x080ccaef in diffcore_std (options=0xbfd91edc) at diff.c:3120
#9  0x08054c33 in find_rename (sb=0xbfd921e8, parent=0x81377c0, 
    origin=0x814c5e0) at builtin-blame.c:427
#10 0x080563a3 in pass_blame (sb=0xbfd921e8, origin=0x814c5e0, opt=0)
    at builtin-blame.c:1216
#11 0x08056d09 in assign_blame (sb=0xbfd921e8, revs=0xbfd92068, opt=0)
    at builtin-blame.c:1501
#12 0x0805942a in cmd_blame (argc=2, argv=0xbfd92404, prefix=0x0)
    at builtin-blame.c:2414
#13 0x0804b7d8 in run_command (p=0x80fa8d0, argc=2, argv=0xbfd92404)
    at git.c:284
#14 0x0804b97a in handle_internal_command (argc=2, argv=0xbfd92404)
    at git.c:398
#15 0x0804ba52 in main (argc=2, argv=0xbfd92404) at git.c:435
(gdb)
Previous: Alex RiesenNext: Johannes Schindelin
Message 10 of 12 in “git blame crashes with internal error”
  1. Björn SteinbrinkOct 14, 2007
  2. Andreas EricssonOct 14, 2007
  3. David KastrupOct 14, 2007
  4. Pierre HabouzitOct 14, 2007
  5. Björn SteinbrinkOct 14, 2007
  6. Johannes SchindelinOct 14, 2007
  7. Björn SteinbrinkOct 14, 2007
  8. Johannes SchindelinOct 14, 2007
  9. Alex RiesenOct 14, 2007
  10. Alex RiesenOct 14, 2007
  11. Johannes SchindelinOct 14, 2007
  12. Linus TorvaldsOct 15, 2007

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.