summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorMartin Ågren <martin.agren@gmail.com>2017-11-05 20:24:28 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-11-06 01:15:29 (GMT)
commit24d707f636f01d41f708a010f255dd46a8fce08c (patch)
treedc3b548317d58c6b073b7a5e847a6d6c9a992a93 /builtin
parentcb5918aa0d50f50e83787f65c2ddc3dcb10159fe (diff)
downloadgit-24d707f636f01d41f708a010f255dd46a8fce08c.zip
git-24d707f636f01d41f708a010f255dd46a8fce08c.tar.gz
git-24d707f636f01d41f708a010f255dd46a8fce08c.tar.bz2
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 'builtin')
-rw-r--r--builtin/rev-list.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index c1c74d4..fb1c36a 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -397,8 +397,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
if (bisect_list) {
int reaches = reaches, all = all;
- revs.commits = find_bisection(revs.commits, &reaches, &all,
- bisect_find_all);
+ find_bisection(&revs.commits, &reaches, &all, bisect_find_all);
if (bisect_show_vars)
return show_bisect_vars(&info, reaches, all);