threads / discuss / 29459

Bisecting through the middle of a big merge?

Subject: Bisecting through the middle of a big merge?

## tl;dr

5 messages between Jan 28, 2012 and Jan 28, 2012.

replies: 4people: 2as markdown or json

walt· Jan 28, 2012, 00:03 UTC · lore

My problem is that I lack a good mental model of what git does when it commits a big merge, and so I get lost when I try to bisect back through a merge. (I'm a tester, not a developer.)

This specific recent example is causing me problems:
Merge: b3c9dd1 85a0f7b
Author: Linus Torvalds
Date:   Sun Jan 15 12:48:41 2012 -0800
    Merge branch 'for-3.3/drivers' of git://git.kernel.dk/linux-block

There are many individual commits from Tejun Heo et al included in that one big commit from Linus. Unfortunately for me, some of those commits cause other problems that I'm not trying to bisect; other problems that evidently get fixed by other commits in the same big merge.

So I do 'git bisect skip' six or eight times until the 'false' bug goes away, and that leaves me at the end of the bisect without finding the individual commit that's causing my 'real' bug.

How do you experts handle this kind of problem?
Thanks for any clues.
Andreas Schwab· Jan 28, 2012, 08:55 UTC · re: walt · lore

Re: Bisecting through the middle of a big merge?

walt <w41ter@gmail.com> writes:
Show 11 quoted lines
> There are many individual commits from Tejun Heo et al included
> in that one big commit from Linus.  Unfortunately for me, some of
> those commits cause other problems that I'm not trying to bisect;
> other problems that evidently get fixed by other commits in the
> same big merge.
>
> So I do 'git bisect skip' six or eight times until the 'false' bug
> goes away, and that leaves me at the end of the bisect without finding
> the individual commit that's causing my 'real' bug.
>
> How do you experts handle this kind of problem?

If you can identify the commit that fixes the unrelated problem you can try to cherry-pick it during the bisect.

Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
walt· Jan 28, 2012, 18:15 UTC · re: Andreas Schwab · lore

Re: Bisecting through the middle of a big merge?

On 01/28/2012 12:55 AM, Andreas Schwab wrote:
Show 16 quoted lines
> walt <w41ter@gmail.com> writes:
> 
>> There are many individual commits from Tejun Heo et al included
>> in that one big commit from Linus.  Unfortunately for me, some of
>> those commits cause other problems that I'm not trying to bisect;
>> other problems that evidently get fixed by other commits in the
>> same big merge.
>>
>> So I do 'git bisect skip' six or eight times until the 'false' bug
>> goes away, and that leaves me at the end of the bisect without finding
>> the individual commit that's causing my 'real' bug.
>>
>> How do you experts handle this kind of problem?
> 
> If you can identify the commit that fixes the unrelated problem you can
> try to cherry-pick it during the bisect.

Thanks Andreas. With an eye to doing that, is there an easy way to get a list of all the commits included in Linus's merge? (I mean a more accurate list than Linus casually mentions in his commit message.)

Trying to build that mental model I mentioned: All the commits from Tejun Heo are dated mid-December but Linus didn't commit them until mid-January. When I'm bisecting through that merge, git builds the kernels with names like vmlinuz-3.2.0-rc5-foo, i.e. names a month older than Linus's current kernel version. Where does git get those older names during the bisect? And does my working tree exclude all of Linus's commits made later than 3.2.0-rc5-foo?

Many thanks.
Andreas Schwab· Jan 28, 2012, 19:47 UTC · re: walt · lore

Re: Bisecting through the middle of a big merge?

walt <w41ter@gmail.com> writes:
> With an eye to doing that, is there an easy way to get a list of all
> the commits included in Linus's merge?
$ git log merge-commit^..merge-commit
Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
walt· Jan 28, 2012, 22:18 UTC · re: Andreas Schwab · lore

Re: Bisecting through the middle of a big merge?

On 01/28/2012 11:47 AM, Andreas Schwab wrote:
Show 6 quoted lines
> walt <w41ter@gmail.com> writes:
> 
>> With an eye to doing that, is there an easy way to get a list of all
>> the commits included in Linus's merge?
> 
> $ git log merge-commit^..merge-commit

Amazing. And obvious now that you've already told me the answer. I'm not thinking like a developer yet, but I'm working on it :)

← back to recent threads