Skip to content

Commit 5209ac4

Browse files
angavrilovspearce
authored andcommitted
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>
1 parent 5a625b0 commit 5209ac4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

builtin-blame.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,6 +1136,8 @@ static int find_copy_in_parent(struct scoreboard *sb,
11361136

11371137
if (!DIFF_FILE_VALID(p->one))
11381138
continue; /* does not exist in parent */
1139+
if (S_ISGITLINK(p->one->mode))
1140+
continue; /* ignore git links */
11391141
if (porigin && !strcmp(p->one->path, porigin->path))
11401142
/* find_move already dealt with this path */
11411143
continue;

0 commit comments

Comments
 (0)