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

Re: [RFC PATCH] bisect run: allow inverting meaning of exit code

From
SOStephen Oberholtzer <stevie@qrpff.net>
Date
Jan 7, 2020, 00:10 UTC
Message-ID
<CAD_xR9dGNKdVNzFgFUaZCgJetpW5tXxb8wERovdjbc=1jS-KxA@mail.gmail.com>
In-Reply-To
<xmqqy2ul9yg0.fsf@gitster-ct.c.googlers.com>
Junio,
On Sun, Jan 5, 2020 at 8:16 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 14 quoted lines
>
> Yeah, I know.  I didn't mean to give you a perfect solution and that
> was why I said "along the line of...".  I know I ignored the 128 and
> above, as I usually trust that our contributors are competent enough
> to be able to fill in the missing details given an outline.
>
> The key takeaway I wanted you to notice was that a single case
> statement that maps the exit code external command would give us
> would look sufficient, without any of the {SUCCESS,FAIL}_TERM magic
> you had in your version, which indicates that there is more than the
> simple "using a run script to find where a bug was fixed can be done
> by swapping exit code" going on.  And it is quite unclear why that
> is needed either from the patch or the text that accompanied the
> patch.

In this particular instance at least, I'm not competent enough to come up with a clean, portable way to create a single case statement that handles the final condition. The issue I'm having is that case-esac blocks do string matching, not integer value matching, so I don't know how to replicate the current behavior without a case pattern that looks like [12]|1[3-9]|1[01][0-9]|12[0-467]|1[3-9]|2[0-9]|[3-9].

-- 
-- Stevie-O
Real programmers use COPY CON PROGRAM.EXE
Previous: Junio C HamanoNext: Junio C Hamano
Message 7 of 8 in “bisect run: allow inverting meaning of exit code”
  1. bisect run: allow inverting meaning of exit codeStephen Oberholtzer, Jan 3, 2020
  2. Jonathan NiederJan 4, 2020
  3. Stephen OberholtzerJan 4, 2020
  4. Junio C HamanoJan 4, 2020
  5. Stephen OberholtzerJan 4, 2020
  6. Junio C HamanoJan 6, 2020
  7. Stephen OberholtzerJan 7, 2020
  8. Junio C HamanoJan 7, 2020

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.