From: Linus Torvalds <torvalds@linux-foundation.org>
To: Bj?rn Steinbrink <B.Steinbrink@gmx.de>
Cc: gitster@pobox.com, git@vger.kernel.org
Subject: Re: git blame crashes with internal error
Date: Mon, 15 Oct 2007 08:39:23 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.0.999.0710150831410.6887@woody.linux-foundation.org> (raw)
In-Reply-To: <20071014143628.GA22568@atjola.homenet>
On Sun, 14 Oct 2007, Bj?rn Steinbrink wrote:
>
> git blame just decided to crash on me, when I tried to use it while
> resolving a merge conflict.
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));
}
prev parent reply other threads:[~2007-10-15 15:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-14 14:36 git blame crashes with internal error Björn Steinbrink
2007-10-14 14:51 ` Andreas Ericsson
2007-10-14 14:56 ` David Kastrup
2007-10-14 16:50 ` Pierre Habouzit
2007-10-14 15:23 ` Björn Steinbrink
2007-10-14 17:32 ` Johannes Schindelin
2007-10-14 20:18 ` Björn Steinbrink
2007-10-14 20:21 ` Johannes Schindelin
2007-10-14 16:37 ` Alex Riesen
2007-10-14 17:33 ` Alex Riesen
2007-10-14 17:51 ` Johannes Schindelin
2007-10-15 15:39 ` Linus Torvalds [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.0.999.0710150831410.6887@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=B.Steinbrink@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).