Re: git blame crashes with internal error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sun, 14 Oct 2007, Alex Riesen wrote:

> 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



-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux