From: Alexander Gavrilov Date: Fri, 3 Oct 2008 16:23:50 +0000 (+0400) Subject: builtin-blame: Fix blame -C -C with submodules. X-Git-Tag: v1.6.0.3~41 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5209ac4de4192e4ffcd72861517daccf387391e5;p=git.git builtin-blame: Fix blame -C -C with submodules. When performing copy detection, git-blame tries to read gitlinks as blobs, which causes it to die. This patch adds a check to skip them. Signed-off-by: Alexander Gavrilov Signed-off-by: Shawn O. Pearce --- diff --git a/builtin-blame.c b/builtin-blame.c index 9bc901c29..101c4162d 100644 --- a/builtin-blame.c +++ b/builtin-blame.c @@ -1136,6 +1136,8 @@ static int find_copy_in_parent(struct scoreboard *sb, if (!DIFF_FILE_VALID(p->one)) continue; /* does not exist in parent */ + if (S_ISGITLINK(p->one->mode)) + continue; /* ignore git links */ if (porigin && !strcmp(p->one->path, porigin->path)) /* find_move already dealt with this path */ continue;