git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Create 'bisect_flags' parameter in find_bisection() in preparation of passing multiple options

From
Christian Couder <christian.couder@gmail.com>
Date
Apr 15, 2018, 09:55 UTC
Message-ID
<CAP8UFD3uz0kQ7s6MyRG=hXg8tYbu7QbRNqMZPstrtmXBZ6eTCg@mail.gmail.com>
In-Reply-To
<20180415085841.1269-1-haraldnordgren@gmail.com>
Hi,

On Sun, Apr 15, 2018 at 10:58 AM, Harald Nordgren <haraldnordgren@gmail.com> wrote:

> ---
>
> Notes:
>     Preperatory patch to enable either Tiago Botelho's or my patch, to do bisection on first parents / merge commits

It would be nice if you could move some part of the above note into the commit message (above the ---). For example:

"Make it possible to implement bisecting only on first parents or on merge commits by passing flags to find_bisection(), instead of just a find_all boolean".

While at it maybe the subject line of the commit message could start with "bisect: create 'bisect_flags' parameter ..." so that we can quickly tell which area of the code it is about.

Show 15 quoted lines
>  bisect.c           | 21 ++++++++++++---------
>  bisect.h           |  5 +++--
>  builtin/rev-list.c |  6 +++---
>  3 files changed, 18 insertions(+), 14 deletions(-)
>
> diff --git a/bisect.c b/bisect.c
> index a579b50884..d85550fd89 100644
> --- a/bisect.c
> +++ b/bisect.c
> @@ -254,7 +254,7 @@ static struct commit_list *best_bisection_sorted(struct commit_list *list, int n
>   */
>  static struct commit_list *do_find_bisection(struct commit_list *list,
>                                              int nr, int *weights,
> -                                            int find_all)
> +                                            int bisect_flags)
I think it's better to use "unsigned int" rather than just "int" for flags.
>  {
>         int n, counted;
>         struct commit_list *p;
[...]
Show 5 quoted lines
> @@ -19,6 +19,7 @@ extern struct commit_list *filter_skipped(struct commit_list *list,
>
>  #define BISECT_SHOW_ALL                (1<<0)
>  #define REV_LIST_QUIET         (1<<1)
> +#define BISECT_FIND_ALL                (1<<2)

Is BISECT_FIND_ALL really related to the other flags, or is this mixing rev list flags with bisect flags?

Thanks for working on this, Christian.

Previous: Harald NordgrenNext: Harald Nordgren
Message 2 of 9 in “Create 'bisect_flags' parameter in find_bisection() in preparation of passing multiple options”
  1. Create 'bisect_flags' parameter in find_bisection() in preparation of passing multiple optionsHarald Nordgren, Apr 15, 2018
  2. Christian CouderApr 15, 2018
  3. Make it possible to implement bisecting only on first parents or on merge commits by passing flags to find_bisection(), instead of just a find_all booleanHarald Nordgren, Apr 15, 2018
  4. Christian CouderApr 15, 2018
  5. bisect: create 'bisect_flags' parameter in find_bisection()Harald Nordgren, Apr 15, 2018
  6. Junio C HamanoApr 17, 2018
  7. Johannes SchindelinApr 18, 2018
  8. bisect: create 'bisect_flags' parameter in find_bisection()Harald Nordgren, Apr 18, 2018
  9. Johannes SchindelinApr 20, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.