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

Re: git blame crashes with internal error

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Oct 14, 2007, 17:51 UTC
Message-ID
<Pine.LNX.4.64.0710141843480.25221@racer.site>
In-Reply-To
<20071014163702.GA2776@steel.home>
Hi,
On Sun, 14 Oct 2007, Alex Riesen wrote:
Show 25 quoted lines
> Bj?rn Steinbrink, Sun, Oct 14, 2007 16:36:28 +0200:
> > 
> > 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.

I _think_ that what blame does here is correct. It wants to handle the rename case, and because of the conflicts, it cannot determine the renames.

The proper thing to do now would be
	git blame HEAD file2
since you want to exclude the working tree from the blaming.

I agree that the error message is not really helping here, though. Since we are not really libified, I do not see an easy way to help here, either, short of git-blame checking for unmerged entries.

Ciao, Dscho

Previous: Alex RiesenNext: Linus Torvalds
Message 11 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.