* [PATCH] Documentation: More examples for git bisect
@ 2009-03-06 9:37 John Tapsell
2009-03-06 20:08 ` Christian Couder
0 siblings, 1 reply; 2+ messages in thread
From: John Tapsell @ 2009-03-06 9:37 UTC (permalink / raw)
To: git; +Cc: John Tapsell
Including passing parameters to the programs, and running more
complicated checks without requiring a seperate shell script.
Signed-off-by: John Tapsell <johnflux@gmail.com>
---
Documentation/git-bisect.txt | 27 ++++++++++++++++++++++++++-
1 files changed, 26 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt
index 147ea38..7b8cfdd 100644
--- a/Documentation/git-bisect.txt
+++ b/Documentation/git-bisect.txt
@@ -212,7 +212,7 @@ If you have a script that can tell if the current source code is good
or bad, you can automatically bisect using:
------------
-$ git bisect run my_script
+$ git bisect run my_script arguments
------------
Note that the "run" script (`my_script` in the above example) should
@@ -251,6 +251,22 @@ EXAMPLES
$ git bisect start HEAD v1.2 -- # HEAD is bad, v1.2 is good
$ git bisect run make # "make" builds the app
------------
++
+This looks for the first revision that fails to build between HEAD and
+the tag 'v1.2'.
+
+* Automatically bisect a test failure between origin and HEAD:
++
+------------
+$ git bisect start HEAD origin -- # HEAD is bad, origin is good
+$ git bisect run make test # "make test" builds and tests
+------------
++
+This looks for the first revision that 'make test' fails for, assuming that
+you have such a Makefile rule, and that 'make test' also builds the source code.
+Note however that if the source fails to build, this will be treated as a bad
+commit. This may not be what you intend, so the following examples instead
+treat build failures as commits to skip.
* Automatically bisect a broken test suite:
+
@@ -291,6 +307,15 @@ It's safer if both "test.sh" and "check_test_case.sh" scripts are
outside the repo to prevent interactions between the bisect, make and
test processes and the scripts.
+* Automatically bisect a broken test suite, simplified version:
++
+------------
+$ git bisect start HEAD HEAD~10 -- # culprit is among the last 10
+$ git bisect run sh -c "make || exit 125; ~/check_test_case.sh"
+------------
++
+Does the same as the previous example, but on a single line.
+
Author
------
Written by Linus Torvalds <torvalds@osdl.org>
--
1.6.2.97.g034f.dirty
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Documentation: More examples for git bisect
2009-03-06 9:37 [PATCH] Documentation: More examples for git bisect John Tapsell
@ 2009-03-06 20:08 ` Christian Couder
0 siblings, 0 replies; 2+ messages in thread
From: Christian Couder @ 2009-03-06 20:08 UTC (permalink / raw)
To: John Tapsell; +Cc: git
Le vendredi 6 mars 2009, John Tapsell a écrit :
> Including passing parameters to the programs, and running more
> complicated checks without requiring a seperate shell script.
>
> Signed-off-by: John Tapsell <johnflux@gmail.com>
> ---
> Documentation/git-bisect.txt | 27 ++++++++++++++++++++++++++-
> 1 files changed, 26 insertions(+), 1 deletions(-)
>
> diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt
> index 147ea38..7b8cfdd 100644
> --- a/Documentation/git-bisect.txt
> +++ b/Documentation/git-bisect.txt
> @@ -212,7 +212,7 @@ If you have a script that can tell if the current
> source code is good or bad, you can automatically bisect using:
>
> ------------
> -$ git bisect run my_script
> +$ git bisect run my_script arguments
> ------------
>
> Note that the "run" script (`my_script` in the above example) should
> @@ -251,6 +251,22 @@ EXAMPLES
> $ git bisect start HEAD v1.2 -- # HEAD is bad, v1.2 is good
> $ git bisect run make # "make" builds the app
> ------------
> ++
> +This looks for the first revision that fails to build between HEAD and
> +the tag 'v1.2'.
There are a few trailing spaces in the above line but otherwise the patch
looks good to me.
Acked-by: Christian Couder <chriscool@tuxfamily.org>
By the way, it would be nice if you could put me in CC.
Thanks,
Christian.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-03-06 20:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-06 9:37 [PATCH] Documentation: More examples for git bisect John Tapsell
2009-03-06 20:08 ` Christian Couder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).