From: Shuang He <shuang.he@intel.com>
To: Avery Pennarun <apenwarr@gmail.com>
Cc: Christian Couder <christian.couder@gmail.com>,
"git@vger.kernel.org" <git@vger.kernel.org>,
Johannes Sixt <j.sixt@viscovery.net>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [RFC] Add bad-branch-first option for git-bisect
Date: Wed, 26 Jan 2011 15:11:14 +0800 [thread overview]
Message-ID: <4D3FC912.4020404@intel.com> (raw)
In-Reply-To: <AANLkTinwbm9gcZhGeQCbOEPov0_xV7uJyQvC7J13qO15@mail.gmail.com>
On 2011/1/25 4:28, Avery Pennarun wrote:
> On Mon, Jan 24, 2011 at 1:53 AM, Christian Couder
> <christian.couder@gmail.com> wrote:
>> I am not opposed to an option to bisect on the first parents of the
>> bad commit only. And after a very fast look at your patch it seems to
>> be what it does. By the way Avery Pennarun's gitbuilder
>> (https://github.com/apenwarr/gitbuilder) does the same thing. So I
>> know some people are interested in such a feature.
> Just some notes on gitbuilder's algorithm, since I haven't spent the
> time to fully understand Shuang's proposal.
>
> I do understand at least one of his concerns, that is, that people
> like to do a lot of "messy" development on a branch, and when the
> branch is done, merge the whole messy branch into the "mainline". The
> messy branch would then have a lot of commits that break a lot of
> things before fixing them again later.
>
> In a corporate environment, this method allows people to work all day,
> make frequent commits, pull from other branches at will, and never
> risk their lives by doing poorly-educated rebases. It works pretty
> well *until* you try to bisect, at which time all these messy commits
> start to bite you.
>
> gitbuilder's bisection is a total hack around this situation, although
> it happens to work perfectly in the workflow it was designed for, thus
> making me feel clever.
>
> Basically, we push/fetch *all* the branches from *everybody* into a
> single repo, and build all of them as frequently as we can. If you
> think about it, if you have all the branches that someone might have
> pulled/merged from, then you don't have to think of the git history as
> a whole complicated DAG; you can just think of it as a whole bunch of
> separate chunks of linear history. Moreover, as long as people are
> careful to only pull from a branch when that branch is passing all
> tests - which you can easily see by looking at the gitbuilder console
> - then playing inside each of these chunks of linear history can help
> you figure out where particular bugs were introduced during "messy"
> branches.
>
> It also allows you a nice separation of concerns. The owner of the
> mainline branch (the "integration manager" person) only really cares
> about which branch they merged that caused a problem, because that
> person doesn't want to fix bugs, he/she simply wants to know who owns
> the failing branch, so that person can fix *their* bug and their
> branch will merge without breaking things.
>
> So this is why gitbuilder uses "git rev-list --first-parent" during
> its "fake bisection" operation: because a different person is
> responsible for each "linear chunk" of history.
>
> Note that you have to use --no-ff when merging if you want this to
> work reliably. But the build manager person can just remember to do
> that. Combining --no-ff and --ff-only (which sound mutually exclusive
> but aren't) is a way to be extra specially sure.
>
> Now, if you aren't using gitbuilder, what we want from "bisection" is
> not quite the same, but let's imagine that you at least have a similar
> setup, where people *only* ever merge into the mainline by using
> --no-ff. In that case, you'd like a bisect operation that *starts* by
> using --first-parent, which will tell you which merge caused the
> problem. After that, you might want to bisect into the branch.
>
> (I don't actually remember if 'git bisect' understands --first-parent
> correctly. gitbuilder doesn't exactly bisect either, but that's
> another story and not relevant right now.)
>
> I can actually imagine that there are many more projects that do what
> I'm talking about - "messy" branches that get broken and fixed over
> time, then merge into a "clean" mainline - than projects (like the
> kernel and git.git) that try to keep all branches clean at all times.
> Thus, I could see some argument that a "--first-parents first"
> bisection would actually help out a lot of people, and maybe even
> deserves to be the default.
>
> I don't really care though, I just use gitbuilder :)
>
> Have fun,
>
> Avery
Thanks for helping explaining those stuff, and also glad to learn more
about gitbuilder :)
Thanks
--Shuang
prev parent reply other threads:[~2011-01-26 7:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-24 2:03 [RFC] Add bad-branch-first option for git-bisect Shuang He
2011-01-24 2:05 ` [PATCH] add config option core.bisectbadbranchfirst Shuang He
2011-01-24 9:53 ` [RFC] Add bad-branch-first option for git-bisect Christian Couder
2011-01-24 10:30 ` Shuang He
2011-01-24 10:50 ` Johannes Sixt
2011-01-24 11:05 ` Shuang He
2011-01-24 20:04 ` Junio C Hamano
2011-01-25 3:27 ` Shuang He
2011-01-25 9:20 ` Christian Couder
2011-01-26 7:22 ` Shuang He
2011-01-26 9:44 ` Christian Couder
2011-01-26 10:40 ` Shuang He
2011-01-24 20:28 ` Avery Pennarun
2011-01-26 7:11 ` Shuang He [this message]
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=4D3FC912.4020404@intel.com \
--to=shuang.he@intel.com \
--cc=apenwarr@gmail.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.