summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gavrilov <angavrilov@gmail.com>2008-10-03 16:23:50 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2008-10-06 06:49:55 (GMT)
commit5209ac4de4192e4ffcd72861517daccf387391e5 (patch)
tree2609ebc3b8ef7380d2794347a8cceb665edf1c6d
parent5a625b07bbff709037f26be1c393337b6d9e103f (diff)
downloadgit-5209ac4de4192e4ffcd72861517daccf387391e5.zip
git-5209ac4de4192e4ffcd72861517daccf387391e5.tar.gz
git-5209ac4de4192e4ffcd72861517daccf387391e5.tar.bz2
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 <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r--builtin-blame.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-blame.c b/builtin-blame.c
index 9bc901c..101c416 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;