Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dd78d7d

Browse files
pks-tEdward Thomson
authored and
Edward Thomson
committed
blame_git: handle error returned by git_commit_parent
1 parent 8d3ee96 commit dd78d7d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/blame_git.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,8 @@ static int pass_blame(git_blame *blame, git_blame__origin *origin, uint32_t opt)
525525
if (sg_origin[i])
526526
continue;
527527

528-
git_commit_parent(&p, origin->commit, i);
528+
if ((error = git_commit_parent(&p, origin->commit, i)) < 0)
529+
goto finish;
529530
porigin = find_origin(blame, p, origin);
530531

531532
if (!porigin)

0 commit comments

Comments
 (0)