git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Michael Haggerty <mhagger@alum.mit.edu>
To: Jacopo Notarstefano <jacopo.notarstefano@gmail.com>
Cc: git@vger.kernel.org,
	Christian Couder <christian.couder@gmail.com>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: An idea for "git bisect" and a GSoC enquiry
Date: Thu, 27 Feb 2014 12:18:41 +0100	[thread overview]
Message-ID: <530F1F11.7060403@alum.mit.edu> (raw)
In-Reply-To: <CAL0uuq0=Zo0X8mYRD6q-Q+QAcZhfmxOwKiRegDrRm3O_i0Q+EA@mail.gmail.com>

On 02/26/2014 09:28 AM, Jacopo Notarstefano wrote:
> my name is Jacopo, a student developer from Italy, and I'm interested
> in applying to this years' Google Summer of Code. I set my eyes on the
> project called "git-bisect improvements", in particular the subtask
> about swapping the "good" and "bad" labels when looking for a
> bug-fixing release.

Hello and welcome!

> I have a very simple proposal for that: add a new "mark" subcommand.
> Here is an example of how it should work:
> 
> 1) A developer wants to find in which commit a past regression was
> fixed. She start bisecting as usual with "git bisect start".
> 2) The current HEAD has the bugfix, so she marks it as fixed with "git
> bisect mark fixed".
> 3) She knows that HEAD~100 had the regression, so she marks it as
> unfixed with "git bisect mark unfixed".
> 4) Now that git knows what the two labels are, it starts bisecting as usual.
> 
> For compatibility with already written scripts, "git bisect good" and
> "git bisect bad" will alias to "git bisect mark good" and "git bisect
> mark bad" respectively.
> 
> Does this make sense? Did I overlook some details?

I don't understand the benefit of adding a new command "mark" rather
than continuing to use "good", "bad", plus new commands "unfixed" and
"fixed".  Does this solve any problems?

What happens if the user mixes, say, "good" and "fixed" in a single
bisect session?

I think it would be more convenient if "git bisect" would autodetect
whether the history went from "good" to "bad" or vice versa.  The
algorithm could be:

1. Wait until the user has marked one commit "bad" and one commit "good".

2. If a "good" commit is an ancestor of a "bad" one, then "git bisect"
should announce "I will now look for the first bad commit".  If
reversed, then announce "I will now look for the first good commit".  If
neither commit is an ancestor of the other, then explain the situation
and ask the user to run "git bisect find-first-bad" or "git bisect
find-first-good" or to mark another commit "bad" or "good".

3. If the user marks another commit, go back to step 2, also doing a
consistency check to make sure that all of the ancestry relationships go
in a consistent direction.

4. After the direction is clear, the old bisect algorithm can be used
(though taking account of the direction).  Obviously a lot of the output
would have to be adjusted, as would the way that a bisect is visualized.

I can't think of any fundamental problems with a scheme like this, and I
think it would be easier to use than the unfixed/fixed scheme.  But that
is only my opinion; other opinions are undoubtedly available :-)

> There were already several proposals on this topic, among which those
> listed at https://git.wiki.kernel.org/index.php/SmallProjectsIdeas#git_bisect_fix.2Funfixed.
> I'm interested in contacting the prospective mentor, Christian Couder,
> to go over these. What's the proper way to ask for an introduction? I
> tried asking on IRC, but had no success.

Just CC Christian on your emails to the mailing list, like I've done
with this email.  As a rule of thumb all communications should go to the
mailing list *plus* any people who are likely to be personally
interested in the topic (e.g., because they have participated in the
thread).

By the way, although "git bisect fixed/unfixed" would be a very useful
improvement, and has gone unimplemented for a lamentably long time, my
personal feeling is that it has too meat in it to constitute a GSoC
project by itself.

Michael

-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/

  parent reply	other threads:[~2014-02-27 11:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26  8:28 An idea for "git bisect" and a GSoC enquiry Jacopo Notarstefano
2014-02-26 19:58 ` Junio C Hamano
2014-02-28  9:00   ` Jacopo Notarstefano
2014-02-27 11:18 ` Michael Haggerty [this message]
2014-02-27 12:09   ` Matthieu Moy
2014-02-28  9:03   ` Jacopo Notarstefano
2014-02-28 18:31     ` Junio C Hamano
2014-03-01 11:31       ` Jacopo Notarstefano
2014-03-03 18:34         ` Junio C Hamano
2014-03-12  1:32           ` Jacopo Notarstefano
2014-03-12 18:31             ` Junio C Hamano
2014-03-13 17:19               ` Michael Haggerty
2014-03-13 18:47                 ` Junio C Hamano
     [not found]   ` <CAL0uuq3TGb2wjaqNxwXYa++E5rjVoozox5mZbzTaE17OKtsVTg@mail.gmail.com>
     [not found]     ` <a8cf74b4-bae1-4511-a45e-d4ca90e3c3e1@email.android.com>
2014-02-28  9:07       ` Jacopo Notarstefano
2014-02-28  9:13       ` Jacopo Notarstefano
2014-02-27 14:47 ` Christian Couder
2014-02-27 22:46   ` Andrew Ardill

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=530F1F11.7060403@alum.mit.edu \
    --to=mhagger@alum.mit.edu \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jacopo.notarstefano@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.
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).