aboutsummaryrefslogtreecommitdiffstats
path: root/t/helper/test-reach.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2024-02-28 09:44:16 +0000
committerJunio C Hamano <gitster@pobox.com>2024-02-29 08:06:01 -0800
commit531738052158fd66bc9b65534309f5c0a9d2808d (patch)
tree6ee90ae876a6b7523575d46931df66295ffb2cc3 /t/helper/test-reach.c
parentf87056ce403b5572683a45efe0e9021777831894 (diff)
downloadgit-531738052158fd66bc9b65534309f5c0a9d2808d.tar.gz
commit-reach(repo_get_merge_bases_many): pass on "missing commits" errors
The `merge_bases_many()` function was just taught to indicate parsing errors, and now the `repo_get_merge_bases_many()` function is aware of that, too. Naturally, there are a lot of callers that need to be adjusted now, too. Next stop: `repo_get_merge_bases_dirty()`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-reach.c')
-rw-r--r--t/helper/test-reach.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/t/helper/test-reach.c b/t/helper/test-reach.c
index c96b62ff1e..1e3b431e3e 100644
--- a/t/helper/test-reach.c
+++ b/t/helper/test-reach.c
@@ -115,9 +115,12 @@ int cmd__reach(int ac, const char **av)
else if (!strcmp(av[1], "is_descendant_of"))
printf("%s(A,X):%d\n", av[1], repo_is_descendant_of(r, A, X));
else if (!strcmp(av[1], "get_merge_bases_many")) {
- struct commit_list *list = repo_get_merge_bases_many(the_repository,
- A, X_nr,
- X_array);
+ struct commit_list *list = NULL;
+ if (repo_get_merge_bases_many(the_repository,
+ A, X_nr,
+ X_array,
+ &list) < 0)
+ exit(128);
printf("%s(A,X):\n", av[1]);
print_sorted_commit_ids(list);
} else if (!strcmp(av[1], "reduce_heads")) {