Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ågren <martin.agren@gmail.com>2017-11-05 23:24:28 +0300
committerJunio C Hamano <gitster@pobox.com>2017-11-06 04:15:29 +0300
commit24d707f636f01d41f708a010f255dd46a8fce08c (patch)
treedc3b548317d58c6b073b7a5e847a6d6c9a992a93 /bisect.h
parentcb5918aa0d50f50e83787f65c2ddc3dcb10159fe (diff)
bisect: change calling-convention of `find_bisection()`
This function takes a commit list and returns a commit list. The returned list is built by modifying the original list. Thus the caller should not use the original list again (and after the next commit fixes a memory leak, it must not). Change the function signature so that it takes a **list and has void return type. That should make it harder to misuse this function. While we're here, document this function. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bisect.h')
-rw-r--r--bisect.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/bisect.h b/bisect.h
index acd12ef802..c535e6d12e 100644
--- a/bisect.h
+++ b/bisect.h
@@ -1,9 +1,15 @@
#ifndef BISECT_H
#define BISECT_H
-extern struct commit_list *find_bisection(struct commit_list *list,
- int *reaches, int *all,
- int find_all);
+/*
+ * Find bisection. If something is found, `reaches` will be the number of
+ * commits that the best commit reaches. `all` will be the count of
+ * non-SAMETREE commits. If nothing is found, `list` will be NULL.
+ * Otherwise, it will be either all non-SAMETREE commits or the single
+ * best commit, as chosen by `find_all`.
+ */
+extern void find_bisection(struct commit_list **list, int *reaches, int *all,
+ int find_all);
extern struct commit_list *filter_skipped(struct commit_list *list,
struct commit_list **tried,