@matheusbsbs / matheus-bagliano / commits / 5209ac4de4
Fork 0

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>

Alexander Gavrilov committed Oct 3, 2008 at 20:23 UTC 5209ac4de4192e4ffcd72861517daccf387391e5
1 file changed +2
builtin-blame.c
+2
@@ -1136,6 +1136,8 @@ static int find_copy_in_parent(struct scoreboard *sb,
1136
1137 if (!DIFF_FILE_VALID(p->one))
1138 continue; /* does not exist in parent */
1139 + if (S_ISGITLINK(p->one->mode))
1140 + continue; /* ignore git links */
1141 if (porigin && !strcmp(p->one->path, porigin->path))
1142 /* find_move already dealt with this path */
1143 continue;