diff options
author | Martin Ågren <martin.agren@gmail.com> | 2017-11-05 21:24:28 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-11-06 02:15:29 +0100 |
commit | 24d707f636f01d41f708a010f255dd46a8fce08c (patch) | |
tree | dc3b548317d58c6b073b7a5e847a6d6c9a992a93 /builtin/rev-list.c | |
parent | Git 2.15 (diff) | |
download | git-24d707f636f01d41f708a010f255dd46a8fce08c.tar.xz git-24d707f636f01d41f708a010f255dd46a8fce08c.zip |
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 '')
-rw-r--r-- | builtin/rev-list.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/rev-list.c b/builtin/rev-list.c index c1c74d4a79..fb1c36af6a 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); |