git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2 amend] Documentation: bisect: add a few "git bisect run" examples
@ 2008-05-07  5:34 Christian Couder
  0 siblings, 0 replies; only message in thread
From: Christian Couder @ 2008-05-07  5:34 UTC (permalink / raw)
  To: Junio Hamano, Pieter de Bie, Jakub Narebski, Manoj Srivastava,
	Thomas Adam, Jeff
  Cc: git

Before this patch, there were no "git bisect run" example.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 Documentation/git-bisect.txt |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

	Junio wrote:
	> As if there were improper examples, and as if this patch adds a proper
	> one.  Drop "proper" and add sign-off perhaps?  ;-)

	> s/install//; let's not set a bad example of installing first and then
	> testing.

	All the above should be fixed in this amended patch.
	Thanks.

diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt
index 698ffde..f9b564c 100644
--- a/Documentation/git-bisect.txt
+++ b/Documentation/git-bisect.txt
@@ -224,6 +224,32 @@ tree to the pristine state.  Finally the "run" script can exit with
 the status of the real test to let "git bisect run" command loop to
 know the outcome.
 
+EXAMPLES
+--------
+
+* Automatically bisect a broken build between v1.2 and HEAD:
++
+------------
+$ git bisect start HEAD v1.2 --      # HEAD is bad, v1.2 is good
+$ git bisect run make                # "make" builds the app
+------------
+
+* Automatically bisect a broken test case using a custom script:
++
+------------
+echo "#"\!"/bin/sh" > ~/test.sh
+echo "make || exit 125" >> ~/test.sh
+echo "~/check_test_case.sh" >> ~/test.sh
+chmod u+x ~/test.sh
+$ git bisect start v1.3 v1.1 --      # v1.3 is bad, v1.1 is good
+$ git bisect run ~/test.sh
+------------
++
+Here we first create the "test.sh" custom script. In this script, if
+"make" fails, we "skip" the current commit.
+And "check_test_case.sh" should "exit 0", if the test case passes, and
+"exit 1" (for example) otherwise.
+
 Author
 ------
 Written by Linus Torvalds <torvalds@osdl.org>
-- 
1.5.5.1.126.g9ca01

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-05-07  5:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-07  5:34 [PATCH 2/2 amend] Documentation: bisect: add a few "git bisect run" examples 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).