diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-08-22 12:00:31 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-08-22 12:00:31 +0200 |
commit | e23dcde328933b9c9eec4ca98f7ceb3db6b56b3b (patch) | |
tree | f3f789106e037ea40b48747bec79fe6a5fbb96b3 /using-git.texinfo | |
parent | amending commits (diff) | |
download | using-git-e23dcde328933b9c9eec4ca98f7ceb3db6b56b3b.tar.gz using-git-e23dcde328933b9c9eec4ca98f7ceb3db6b56b3b.tar.bz2 using-git-e23dcde328933b9c9eec4ca98f7ceb3db6b56b3b.tar.xz |
bisection
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | using-git.texinfo | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/using-git.texinfo b/using-git.texinfo index 0407f0f..592df2c 100644 --- a/using-git.texinfo +++ b/using-git.texinfo @@ -1003,6 +1003,63 @@ included in the amendment. @node Bisection @section Bisection +Bisection is the process of identifying +when a bug was introduced. + +To start a bisection you first need +to tell git to start bisection and +specify the commit range. If the current +commit is bad you type: + +@example +git bisect start +git bisect bad +git bisect good LAST_KNOWN_GOOD_COMMIT +@end example + +After this you either of, depending if +the commit Git checks out is good or bad: + +@example +git bisect good +git bisect bad +@end example + +Git will tell you when it has found the +the first bad or possible first bad commit. +To then checkout the commit that was +checked out before the bisection started +type: + +@example +git bisect reset +@end example + +If you in the process of the bisection +landed on a commit you need to skip because +it has some other problem, you can use + +@example +git reset --hard HEAD~N +@end example + +Where @code{N} is the number of revisions +before the checked out, you want to jump to. +You can also use @command{git bisect skip} +to Git which revision that cannot be tested +so they are excluded from the bisection +process. + +Instead of manually telling Git if a commit +is good or bad, you can use: + +@example +git bisect TEST_SCRIPT [ARGUMENTS...] +@end example + +The test script should exit with 0, if and +only if the commit is good. + @node GNU Free Documentation License |