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 коммит произвёл Shawn O. Pearce
Родитель 5a625b07bb
Коммит 5209ac4de4
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

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