Commit 017c0eac2b03e4dbe336d942ff66b09c253d2fd3

Arthur Schreiber 2014-08-25T22:41:07

merge base: Correctly raise an error if a non-commit object is passed.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/merge.c b/src/merge.c
index 668ac2c..add7eab 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -228,8 +228,11 @@ int git_merge__bases_many(git_commit_list **out, git_revwalk *walk, git_commit_l
 		return -1;
 
 	git_vector_foreach(twos, i, two) {
-		git_commit_list_parse(walk, two);
+		if (git_commit_list_parse(walk, two) < 0)
+			return -1;
+
 		two->flags |= PARENT2;
+
 		if (git_pqueue_insert(&list, two) < 0)
 			return -1;
 	}