diff options
Diffstat (limited to 'src/merge.c')
| -rw-r--r-- | src/merge.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/merge.c b/src/merge.c index 0b11c0da3..66952c074 100644 --- a/src/merge.c +++ b/src/merge.c @@ -205,6 +205,12 @@ int git_merge__bases_many(git_commit_list **out, git_revwalk *walk, git_commit_l git_commit_list *result = NULL, *tmp = NULL; git_pqueue list; + /* If there's only the one commit, there can be no merge bases */ + if (twos->length == 0) { + *out = NULL; + return 0; + } + /* if the commit is repeated, we have a our merge base already */ git_vector_foreach(twos, i, two) { if (one == two) |
