Re: git blame crashes with internal error

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Bj?rn Steinbrink <B.Steinbrink@...>
Cc: <gitster@...>, <git@...>
Date: Monday, October 15, 2007 - 11:39 am

On Sun, 14 Oct 2007, Bj?rn Steinbrink wrote:

Yes. What's going on is that "ce_mode = 0" is a magic marker for an 
unmerged entry (set up by things like diff-lib.c:do_diff_cache() and 
builtin-read-tree.c:read_tree_unmerged()) and the ce_match_stat_basic() 
function gets upset about this.

I'm not entirely sure that the whole "ce_mode = 0" case is a good idea to 
begin with, and maybe the right thing to do is to remove that horrid 
freakish special case, but removing the internal error seems to be the 
simplest fix for now.

		Linus

---
 read-cache.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/read-cache.c b/read-cache.c
index 56202d1..3b11aa7 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -149,6 +149,8 @@ static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st)
 		else if (ce_compare_gitlink(ce))
 			changed |= DATA_CHANGED;
 		return changed;
+	case 0:		/* Special case: unmerged file in index */
+		return MODE_CHANGED | DATA_CHANGED | TYPE_CHANGED;
 	default:
 		die("internal error: ce_mode is %o", ntohl(ce->ce_mode));
 	}
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git blame crashes with internal error, Björn, (Sun Oct 14, 10:36 am)
Re: git blame crashes with internal error, Linus Torvalds, (Mon Oct 15, 11:39 am)
Re: git blame crashes with internal error, Alex Riesen, (Sun Oct 14, 12:37 pm)
Re: git blame crashes with internal error, Johannes Schindelin, (Sun Oct 14, 1:51 pm)
Re: git blame crashes with internal error, Alex Riesen, (Sun Oct 14, 1:33 pm)
Re: git blame crashes with internal error, Andreas Ericsson, (Sun Oct 14, 10:51 am)
Re: git blame crashes with internal error, Björn, (Sun Oct 14, 11:23 am)
Re: git blame crashes with internal error, Johannes Schindelin, (Sun Oct 14, 1:32 pm)
Re: git blame crashes with internal error, Björn, (Sun Oct 14, 4:18 pm)
Re: git blame crashes with internal error, Johannes Schindelin, (Sun Oct 14, 4:21 pm)
Re: git blame crashes with internal error, David Kastrup, (Sun Oct 14, 10:56 am)
Re: git blame crashes with internal error, Pierre Habouzit, (Sun Oct 14, 12:50 pm)