Skip to content

Commit

Permalink
builtin-blame: Fix blame -C -C with submodules.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Gavrilov authored and Shawn O. Pearce committed Oct 6, 2008
1 parent 5a625b0 commit 5209ac4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions builtin-blame.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5209ac4

Please sign in to comment.