git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Christian Couder <chriscool@tuxfamily.org>
Cc: Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, Sam Vilain <sam@vilain.net>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH v2 1/3] bisect: add parameters to "filter_skipped"
Date: Thu, 04 Jun 2009 23:48:29 -0700	[thread overview]
Message-ID: <7vtz2vp45e.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: 20090605041044.8885.91204.chriscool@tuxfamily.org

Christian Couder <chriscool@tuxfamily.org> writes:

> because we will need to get more information from this function in
> some later patches.
>
> The new "int *count" parameter gives the number of commits left after
> the skipped commit have been filtered out.
>
> The new "int *skipped_first" parameter tells us if the first commit
> in the list has been skipped. Note that using this parameter also
> changes the behavior of the function if the first commit is indeed
> skipped. Because we assume that in this case we will want all the
> filtered commits, not just the first one, even if "show_all" is not
> set.

The way you use (*skipped_first == -1) as a marker to mean "we've already
checked more than one commit_list so even when we see a one to be skipped,
it won't be the first one" is unreadable, especially without explanation.
Worse yet, the above paragraph explains what the parameter does, but why
is it so special to skip the one that happens to be the first on the input
list, especially when one does not know how the list is sorted to begin
with.

I understand that the list is sorted by the "goodness" value, i.e. the one
that cuts the graph into closer-to-equal halves comes earlier in the list,
but still it is unclear why having to skip the best one is so special
compared to having to skip say the second best one, especially when you
imagine a case where the first two on the list are of equal "goodness"
value.

  reply	other threads:[~2009-06-05  6:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-05  4:10 [PATCH v2 0/3] automatically skip away from broken commits Christian Couder
2009-06-05  4:10 ` [PATCH v2 1/3] bisect: add parameters to "filter_skipped" Christian Couder
2009-06-05  6:48   ` Junio C Hamano [this message]
2009-06-06  4:38     ` Christian Couder
2009-06-05  4:10 ` [PATCH v2 2/3] bisect: when skipping, choose a commit away from a skipped commit Christian Couder
2009-06-05  6:48   ` Junio C Hamano
2009-06-06  4:38     ` Christian Couder
2009-06-06  5:19       ` Junio C Hamano
2009-06-05  4:10 ` [PATCH v2 3/3] t6030: test skipping away from an already " Christian Couder

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=7vtz2vp45e.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=hpa@zytor.com \
    --cc=mingo@elte.hu \
    --cc=sam@vilain.net \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).