Skip to content

Commit 09f3cbd

Browse files
committed
doc: add git-bisect.md
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
1 parent 1ddd495 commit 09f3cbd

File tree

2 files changed

+101
-6
lines changed

2 files changed

+101
-6
lines changed

_doc/git-bisect.md

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
layout: page
3+
title: git bisect
4+
date: 2015-03-16
5+
author: Nicolas Sebrecht
6+
---
7+
8+
{% assign offlineimap = site.data.links.offlineimap %}
9+
{% assign icons = site.data.icons %}
10+
11+
{: .note}
12+
There are already a lot of documentation about `git bisect`, already. Sadly, few explain HOW to do it properly when you're not used to development.
13+
14+
15+
* junk
16+
{:toc}
17+
18+
---
19+
20+
## Pre-requisite
21+
22+
You'll need `git` and the git repository of OfflineIMAP, of course... ;-)
23+
24+
Clone the repository:
25+
26+
{% highlight bash %}
27+
$ git clone {{ offlineimap.repository }}
28+
{% endhighlight %}
29+
30+
## The commands
31+
32+
There are few simple commands to know.
33+
34+
* Start a session
35+
{% highlight bash %}
36+
$ git bisect start
37+
{% endhighlight %}
38+
39+
* Mark as good
40+
{% highlight bash %}
41+
$ git bisect good
42+
{% endhighlight %}
43+
44+
* Mark as bad
45+
{% highlight bash %}
46+
$ git bisect bad
47+
{% endhighlight %}
48+
49+
* Ignore a step
50+
{% highlight bash %}
51+
$ git bisect skip
52+
{% endhighlight %}
53+
54+
* Stop a session
55+
{% highlight bash %}
56+
$ git bisect reset
57+
{% endhighlight %}
58+
59+
## Effective session
60+
61+
Before starting, you should know what version works and what version does not. This is required to start the process.
62+
63+
{% highlight bash %}
64+
$ git bisect start
65+
$ git bisect good v6.5.6
66+
$ git bisect bad v6.5.7-rc2
67+
{% endhighlight %}
68+
69+
From there, it's you're job to define if OfflineIMAP has the **same issue** or not.
70+
71+
{% highlight bash %}
72+
$ ./offlineimap.py [THE USUAL OPTIONS]
73+
{% endhighlight %}
74+
75+
{: .warning}
76+
{{ icons.warning }} Warning {{ icons.end }}
77+
Be care to mark the checkouted version as `good` or `bad` **ONLY** if you're sure about that.
78+
 
79+
*A wrong declaration will put you in the wrong direction.*
80+
81+
When in doubt, you must input the `git bisect skip` command.
82+
83+
{: .warning}
84+
{{ icons.warning }} Warning {{ icons.end }}
85+
**A failing run does NOT necessary mean you should declare it `bad`.**
86+
 
87+
In such case, you must check what's the error and if it's the one you are bisecting. Otherwise, you must input `git bisect skip` command, too.
88+
89+
## Understanding what is done
90+
91+
The process is fairly simple to understand. It just start in the middle of the patch series between the one marked as `good` and the one marked as `bad`. When a new `good`/`bad` is declared, it take the new middle between both and continue.
92+
93+
{: .note}
94+
It's a bit more complex if the *git history* is not linear but we don't have to care about the internals.
95+
96+
<!--
97+
vim: expandtab ts=2 :
98+
-->

documentation.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,10 @@ Don't change the fixed id: there is a reference to here from the about page.
3535

3636
### Users
3737

38-
{: #updating-website}
39-
#### Updating the website
40-
41-
* [Quick start]({{ site.base }}/doc/website-quick-start.html)
42-
43-
#### Updating the wiki
38+
* [git bisect](/doc/git-bisect.html), how to find the offending patch
4439

40+
{: #updating-website}
41+
* [Update the website]({{ site.base }}/doc/website-quick-start.html)
4542
* [How to contribute the wiki]({{ site.base }}/doc/contribute-wiki.html)
4643

4744
### Developers

0 commit comments

Comments
 (0)