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

Re: [PATCH] Bisect run: "skip" current commit if script exit code is 125.

From
Benoit SIGOURE <tsuna@lrde.epita.fr>
Date
Oct 26, 2007, 06:25 UTC
Message-ID
<A43880E9-E496-48AA-BC1C-2C98DFD12370@lrde.epita.fr>
In-Reply-To
<20071026053937.2831a89b.chriscool@tuxfamily.org>
On Oct 26, 2007, at 5:39 AM, Christian Couder wrote:
Show 41 quoted lines
> This is incompatible with previous versions because an exit code
> of 125 used to mark current commit as "bad". But hopefully this exit
> code is not much used by test scripts or other programs. (126 and 127
> are used by bash.)
>
> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
> ---
>  Documentation/git-bisect.txt |    8 ++++++--
>  git-bisect.sh                |   11 ++++++++++-
>  t/t6030-bisect-porcelain.sh  |   40 +++++++++++++++++++++++++++++++ 
> +++++++++
>  3 files changed, 56 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/git-bisect.txt b/Documentation/git- 
> bisect.txt
> index 785f381..14b7a95 100644
> --- a/Documentation/git-bisect.txt
> +++ b/Documentation/git-bisect.txt
> @@ -183,13 +183,17 @@ $ git bisect run my_script
>
>  Note that the "run" script (`my_script` in the above example) should
>  exit with code 0 in case the current source code is good and with a
> -code between 1 and 127 (included) in case the current source code is
> -bad.
> +code between 1 and 127 (included), except 125 that is special, in  
> case
> +the current source code is bad.
>
>  Any other exit code will abort the automatic bisect process. (A
>  program that does "exit(-1)" leaves $? = 255, see exit(3) manual  
> page,
>  the value is chopped with "& 0377".)
>
> +The special exit code 125 should be used when the current source code
> +cannot be tested. If the "run" script exits with this code, the  
> current
> +revision will be "skip"ped, see `git bisect skip` above.
> +
>  You may often find that during bisect you want to have near-constant
>  tweaks (e.g., s/#define DEBUG 0/#define DEBUG 1/ in a header file, or
>  "revision that does not have this commit needs this patch applied to

Since exit 77 is already used by automake to mean "skip", wouldn't it be better to do the same thing here?

Cheers,
-- 
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory
Previous: Christian CouderNext: Christian Couder
Message 2 of 5 in “Bisect run: "skip" current commit if script exit code is 125.”
  1. Bisect run: "skip" current commit if script exit code is 125.Christian Couder, Oct 26, 2007
  2. Benoit SIGOUREOct 26, 2007
  3. Christian CouderOct 27, 2007
  4. Tom PrinceOct 27, 2007
  5. Junio C HamanoOct 27, 2007

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.