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

Skip to content

Commit 4cacf5b

Browse files
committed
merge-base: Do not read parents from the root
1 parent 136a71f commit 4cacf5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/merge.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ static void clear_commit_marks_1(git_commit_list **plist,
318318
git_commit_list_insert(p, plist);
319319
}
320320

321-
commit = commit->parents[0];
321+
commit = commit->out_degree ? commit->parents[0] : NULL;
322322
}
323323
}
324324

0 commit comments

Comments
 (0)