Git Mailing List Archive on lore.kernel.org
 help / color / Atom feed
From: Christian Couder <christian.couder@gmail.com>
To: Harald Nordgren <haraldnordgren@gmail.com>
Cc: git <git@vger.kernel.org>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Tiago Botelho <tiago@gitlab.com>,
	Stefan Beller <sbeller@google.com>
Subject: Re: [PATCH] Create 'bisect_flags' parameter in find_bisection() in preparation of passing multiple options
Date: Sun, 15 Apr 2018 11:55:16 +0200
Message-ID: <CAP8UFD3uz0kQ7s6MyRG=hXg8tYbu7QbRNqMZPstrtmXBZ6eTCg@mail.gmail.com> (raw)
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.

>  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;

[...]

> @@ -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.

  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-15  8:58 Harald Nordgren
2018-04-15  9:55 ` Christian Couder [this message]
2018-04-15 10:44 ` [PATCH v2] 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 Harald Nordgren
2018-04-15 13:35   ` Christian Couder
2018-04-15 13:49 ` [PATCH v3] bisect: create 'bisect_flags' parameter in find_bisection() Harald Nordgren
2018-04-17  2:15   ` Junio C Hamano
2018-04-18 20:31   ` Johannes Schindelin
2018-04-18 21:05 ` [PATCH v4] " Harald Nordgren
2018-04-20 12:23   ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAP8UFD3uz0kQ7s6MyRG=hXg8tYbu7QbRNqMZPstrtmXBZ6eTCg@mail.gmail.com' \
    --to=christian.couder@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=haraldnordgren@gmail.com \
    --cc=sbeller@google.com \
    --cc=tiago@gitlab.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Mailing List Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/git/0 git/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 git git/ https://lore.kernel.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.git


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git