git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Ardill <andrew.ardill@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Christian Couder <chriscool@tuxfamily.org>,
	Jeff King <peff@peff.net>, Michal Vyskocil <mvyskocil@suse.cz>,
	git@vger.kernel.org, Sverre Rabbelier <srabbelier@gmail.com>,
	Johannes Sixt <j6t@kdbg.org>
Subject: Re: [RFC/PATCH]: reverse bisect v 2.0
Date: Fri, 7 Oct 2011 12:57:30 +1100	[thread overview]
Message-ID: <CAH5451kUf=vPfgOOusmJjfbiyueX9VByJLzZ9WbyqLd0z78wxA@mail.gmail.com> (raw)
In-Reply-To: <7v62k4ban7.fsf@alter.siamese.dyndns.org>

Hi, I have given this some thought and have a slightly different
proposal for the options to use. I have written a commit message that
I think explains the need for the improvement, and justifies my
proposal. The options I propose are '--intoduced' and '--removed'.

--->8---

Bisect is used to look for a commit that causes a specific change.
Such a change can be classified by the user as either introducing
something, or removing something, and this distinction is arbitrary. A
change could be said to introduce a bug fix, or remove a bug - both
formulations have inherently the same meaning, but search behaviour
changes depending on which one we use.
Suppose I want to find the commit that removed a bug. If I examine a
snapshot and it contains the bug, the bug has not yet been *removed*
and I must look in the future for its removal. Conversely, if I
examine a snapshot and the bug fix exists, the bug fix must have been
*introduced* at some earlier point and so I must search backwards.

Confusion exists at this point because at each verification step a
question like 'Does this snapshot have X?' is asked, when what we
eventually want to know is 'When was X introduced?' or 'When was X
removed?'. Previously there has been no way to specify if we are
looking for X being introduced or removed; it was assumed that we were
looking for when something was introduced, for example when a bug was
introduced.

Teach git bisect if we are looking for when something was introduced
or when something was removed.

Examples.
Search for a feature add:
   $ git bisect start --introduced='feature: git frotz says xyzzy' v0.99 master
   Bisecting: 171 revisions left to test after this (roughly 8 steps)
   $ ... build and then test ...
   $ git bisect tested
   Does this snapshot have 'feature: git frotz says xyzzy' [y/n]? yes
# already added, look backwards

Search for a feature regression:
   $ git bisect start --removed='feature: git frotz says xyzzy' v0.99 master
   Bisecting: 171 revisions left to test after this (roughly 8 steps)
   $ ... build and then test ...
   $ git bisect tested
   Does this snapshot have 'feature: git frotz says xyzzy' [y/n]? yes
# not removed yet, look forwards

--->8---

Regards,

Andrew Ardill

  reply	other threads:[~2011-10-07  1:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-29 14:20 RFC: reverse bisect Michal Vyskocil
2011-09-29 14:42 ` Sverre Rabbelier
2011-09-29 16:27 ` Johannes Sixt
2011-09-30  4:09   ` Jeff King
2011-09-30  5:31     ` Frans Klaver
2011-09-30  8:29   ` Michal Vyskocil
2011-09-30 11:42 ` [RFC/PATCH]: reverse bisect v 2.0 Michal Vyskocil
2011-09-30 18:13   ` Junio C Hamano
2011-10-03 10:41     ` Jeff King
2011-10-03 17:00       ` Junio C Hamano
2011-10-04 10:30         ` Jeff King
2011-10-04 15:22           ` Junio C Hamano
2011-10-04 22:34             ` Christian Couder
2011-10-04 23:27               ` Junio C Hamano
2011-10-07  1:57                 ` Andrew Ardill [this message]
2011-10-12  4:57                   ` Junio C Hamano
2011-10-12 20:14                     ` Jeff King

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='CAH5451kUf=vPfgOOusmJjfbiyueX9VByJLzZ9WbyqLd0z78wxA@mail.gmail.com' \
    --to=andrew.ardill@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=mvyskocil@suse.cz \
    --cc=peff@peff.net \
    --cc=srabbelier@gmail.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).