diff options
author | Aaron Lipman <alipman88@gmail.com> | 2020-08-07 17:58:38 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-08-07 15:13:03 -0700 |
commit | ad464a4e84b502fdfd4671f1c443060c7e87113f (patch) | |
tree | 9ba095151311c3c7c160109f030105b42d206826 /builtin | |
parent | bisect: introduce first-parent flag (diff) | |
download | tgif-ad464a4e84b502fdfd4671f1c443060c7e87113f.tar.xz |
bisect: combine args passed to find_bisection()
Now that find_bisection() accepts multiple boolean arguments, these may
be combined into a single unsigned integer in order to declutter some of
the code in bisect.c
Also, rename the existing "flags" bitfield to "commit_flags", to
explicitly differentiate it from the new "bisect_flags" bitfield.
Based-on-patch-by: Harald Nordgren <haraldnordgren@gmail.com>
Signed-off-by: Aaron Lipman <alipman88@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/rev-list.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/builtin/rev-list.c b/builtin/rev-list.c index d1a14596b2..25c6c3b38d 100644 --- a/builtin/rev-list.c +++ b/builtin/rev-list.c @@ -637,8 +637,15 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix) if (bisect_list) { int reaches, all; + unsigned bisect_flags = 0; - find_bisection(&revs.commits, &reaches, &all, bisect_find_all, revs.first_parent_only); + if (bisect_find_all) + bisect_flags |= FIND_BISECTION_ALL; + + if (revs.first_parent_only) + bisect_flags |= FIND_BISECTION_FIRST_PARENT_ONLY; + + find_bisection(&revs.commits, &reaches, &all, bisect_flags); if (bisect_show_vars) return show_bisect_vars(&info, reaches, all); |