From: Andreas Ericsson <ae@op5.se>
To: Steffen Prohaska <prohaska@zib.de>
Cc: Johannes Sixt <j.sixt@viscovery.net>,
gitster@pobox.com, Ralf.Wildenhues@gmx.de, tsuna@lrde.epita.fr,
git@vger.kernel.org
Subject: Re: [PATCH v2] user-manual: add advanced topic "bisecting merges"
Date: Thu, 08 Nov 2007 14:38:54 +0100 [thread overview]
Message-ID: <4733116E.5020300@op5.se> (raw)
In-Reply-To: <97F64156-A457-4BC1-84BE-108369FFD18C@zib.de>
Steffen Prohaska wrote:
>
> On Nov 8, 2007, at 10:53 AM, Johannes Sixt wrote:
>
>> Andreas Ericsson schrieb:
>>> Johannes Sixt wrote:
>>>> Steffen Prohaska schrieb:
>>>>>
>>>>> On Nov 8, 2007, at 8:19 AM, Johannes Sixt wrote:
>>>>>
>>>>>> Steffen Prohaska schrieb:
>>>>>>> +If you linearize the history by rebasing the lower branch on
>>>>>>> +top of the upper, instead of merging, the bug becomes much
>>>>>>> easier to
>>>>>>> +find and understand. Your history would instead be:
>>>>>>
>>>>>> At this point I'm missing the words
>>>>>>
>>>>>> The solution is ...
>>>>>>
>>>>>> I.e.:
>>>>>>
>>>>>> The solution is to linearize the history by rebasing the lower
>>>>>> branch on
>>>>>> top of the upper, instead of merging. Now the bug becomes much
>>>>>> easier to
>>>>>> find and understand. Your history would instead be:
>>>>>
>>>>> Hmm. It might be a solution if you did not publish history.
>>>>
>>>> This is about finding the commit that introduced a bug. Once you
>>>> found it, better: you know how to fix the bug, you are expected to
>>>> throw away the rebased branch, not to publish it! Maybe a note along
>>>> these lines could be appended:
>>>>
>>>> Now that you know what caused the error (and how to fix it), throw
>>>> away the rebased branch, and commit a fix on top of D.
>>>>
>>> Well, if rebasing becomes the standard for normal development, it's
>>> hardly
>>> right to throw it away, is it? I like Steffen's suggestion better.
>>
>> There is a big misunderstanding. The text that the patch amends is
>> about bisecting history that reveals that a merge commit breaks, which
>> is not helpful, and then how to find where and what and why the
>> breakage really was introduce.
>>
>> And the answer to "how to find" is to rebase and bisect in the rebased
>> history.
>
> Do you use rebase like this in real life?
>
> I thought of the text as background information that might
> be helpful for users who want do decide wether to merge or
> to rebase. The problem described may be valuable information
> supporting a decision about a recommended workflow for a group
> of users.
>
> My personal conclusion was: I'll accept the danger of complex
> merges that might be hard to bisect. I now understand this
> risk, but I nonetheless prefer the simplicity of a merge
> based workflow. This avoids the danger that published history
> gets rewritten.
>
> But now I'm wondering if your suggestions of rebasing only for
> locating the evil commit is feasible in reality. You may need
> to solve a lot of merge conflicts if you rebase a larger part
> of the history. If you do not have them in your rerere cache
> this might be time consuming. ...
>
It is no great chore to put one merge-parent on top of another
and then re-run bisect on the result. git-bisect could even be
taught to do that by itself.
>
>> My initial complaint was that in the flow of reading the instructions
>> the pointer to "the solution" was missing. Rather, at the point where
>> the reader is supposed to think "ah, yes, that's how to do it", there
>> is the conditional statement "If you linearize history". My suggestion
>> is to put a big emphasis on the solution by using the words "The
>> solution is".
>>
>> Now, the user can *always* rebase one of the branches on top of the
>> other, even if both histories are already published. *But* if both
>> were indeed published, then the rebased history must be thrown away,
>> and the only thing you learnt from it was where and what and why the
>> breakage really was introduced.
>>
>> Of course we could include a few "ifs" and "unlesses" (about published
>> histories), before suggesting to throw away rebased history. But once
>> the task is accomplished (find the bogus commit), throwing away the
>> rebased history (and continuing at commit D) is always correct, but
>> keeping it (and continuing at D*) is not.
>
> ... So, again, the question for me is if someone does use
> rebase in reality in the way that you suggests. Do you?
I don't, but if I'd thought a bit further I would have on at least one
occasion in the past. Instead I spent two days manually auditing every
commit of several branches.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
next prev parent reply other threads:[~2007-11-08 13:40 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-04 9:16 [PATCH] user-manual: add advanced topic "bisecting merges" Steffen Prohaska
2007-11-04 11:23 ` Ralf Wildenhues
2007-11-07 21:50 ` [PATCH v2] " Steffen Prohaska
2007-11-07 22:16 ` Benoit Sigoure
2007-11-07 22:26 ` J. Bruce Fields
2007-11-08 6:40 ` Steffen Prohaska
2007-11-08 7:19 ` Johannes Sixt
2007-11-08 8:59 ` Steffen Prohaska
2007-11-08 9:11 ` Johannes Sixt
2007-11-08 9:33 ` Andreas Ericsson
2007-11-08 9:53 ` Johannes Sixt
2007-11-08 12:54 ` Steffen Prohaska
2007-11-08 13:22 ` Johannes Sixt
2007-11-08 14:55 ` Steffen Prohaska
2007-11-10 9:48 ` [PATCH v3] " Steffen Prohaska
2007-11-10 10:36 ` Junio C Hamano
2007-11-10 11:16 ` Steffen Prohaska
2007-11-10 13:49 ` [PATCH v4] user-manual: Add section "Why bisecting merge commits can be harder ..." Steffen Prohaska
2007-11-10 19:10 ` Linus Torvalds
2007-11-10 20:25 ` Junio C Hamano
2007-11-10 22:41 ` Steffen Prohaska
2007-11-18 3:59 ` J. Bruce Fields
2007-11-18 9:47 ` Steffen Prohaska
2007-11-18 23:18 ` J. Bruce Fields
2007-11-08 13:38 ` Andreas Ericsson [this message]
2007-11-08 14:51 ` [PATCH v2] user-manual: add advanced topic "bisecting merges" Benoit Sigoure
2007-11-08 15:07 ` Steffen Prohaska
2007-11-08 15:23 ` Johannes Schindelin
2007-11-08 18:38 ` Brian Gernhardt
2007-11-04 13:50 ` [PATCH] " Benoit SIGOURE
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=4733116E.5020300@op5.se \
--to=ae@op5.se \
--cc=Ralf.Wildenhues@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.net \
--cc=prohaska@zib.de \
--cc=tsuna@lrde.epita.fr \
/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.