mirror of
https://github.com/git/git
synced 2024-08-28 12:09:19 +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:
parent
5a625b07bb
commit
5209ac4de4
|
@ -1136,6 +1136,8 @@ static int find_copy_in_parent(struct scoreboard *sb,
|
||||||
|
|
||||||
if (!DIFF_FILE_VALID(p->one))
|
if (!DIFF_FILE_VALID(p->one))
|
||||||
continue; /* does not exist in parent */
|
continue; /* does not exist in parent */
|
||||||
|
if (S_ISGITLINK(p->one->mode))
|
||||||
|
continue; /* ignore git links */
|
||||||
if (porigin && !strcmp(p->one->path, porigin->path))
|
if (porigin && !strcmp(p->one->path, porigin->path))
|
||||||
/* find_move already dealt with this path */
|
/* find_move already dealt with this path */
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue