diff options
author | Vicent Marti <tanoku@gmail.com> | 2015-10-30 11:50:43 +0100 |
---|---|---|
committer | Carlos MartÃn Nieto <cmn@dwim.me> | 2015-11-04 17:17:38 -0800 |
commit | 0740382c56ab3c011a85434df796df701c54cc6e (patch) | |
tree | 9c4db0a1c370bd06d69e099635454f523d6d0c8b | |
parent | 5b6af2cc2f02a8cc3acb1ad1fbc034ec4887405b (diff) | |
download | libgit2-0740382c56ab3c011a85434df796df701c54cc6e.tar.gz |
merge-base: Do not read parents from the root
-rw-r--r-- | src/merge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/merge.c b/src/merge.c index 1e523d76c..a632f901a 100644 --- a/src/merge.c +++ b/src/merge.c @@ -318,7 +318,7 @@ static void clear_commit_marks_1(git_commit_list **plist, git_commit_list_insert(p, plist); } - commit = commit->parents[0]; + commit = commit->out_degree ? commit->parents[0] : NULL; } } |