1
0
mirror of https://github.com/git/git synced 2024-07-07 19:39:27 +00:00

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>
This commit is contained in:
Alexander Gavrilov 2008-10-03 20:23:50 +04:00 committed by Shawn O. Pearce
parent 5a625b07bb
commit 5209ac4de4

View File

@ -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;