git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Documentation - More examples for git bisect

From
Christian Couder <chriscool@tuxfamily.org>
Date
Mar 6, 2009, 07:46 UTC
Message-ID
<200903060846.25151.chriscool@tuxfamily.org>
In-Reply-To
<1236256574-24764-1-git-send-email-johnflux@gmail.com>
On a second look here are a few nit picks.
First the patch title could be:
"Documentation: More examples for git bisect"
instead of:
"Documentation - More examples for git bisect"
as it would be more consistent with other patches.
Le jeudi 5 mars 2009, John Tapsell a écrit :
Show 31 quoted lines
> Including passing parameters to the programs, and running more
> complicated checks without requiring a seperate shell script.
>
> Signed-off-by: John Tapsell
> ---
>  Documentation/git-bisect.txt |   18 +++++++++++++++++-
>  1 files changed, 17 insertions(+), 1 deletions(-)
>
> diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt
> index 147ea38..e65c1ca 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
> @@ -252,6 +252,13 @@ $ git bisect start HEAD v1.2 --      # HEAD is bad,
> v1.2 is good $ git bisect run make                # "make" builds the app
>  ------------
>
> +* 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
> +------------

Perhaps we should add that the above may not work well if there are some commits that don't build. And that it is fixed in the example below this one.

Show 8 quoted lines
>  * Automatically bisect a broken test suite:
>  +
>  ------------
> @@ -291,6 +298,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:
The title of the previous example is 
* Automatically bisect a broken test case:
so if it is the same, then it should perhaps have the same title or perhaps:
* Automatically bisect a broken test case simplified:
or something like that.
Show 8 quoted lines
> ++
> +------------
> +$ 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.
> +

Thanks, Christian.

Previous: John Tapsell
Message 4 of 4 in “Documentation - More examples for git bisect”
  1. Documentation - More examples for git bisectJohn Tapsell, Mar 5, 2009
  2. Christian CouderMar 5, 2009
  3. John TapsellMar 6, 2009
  4. Christian CouderMar 6, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.