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

Re: [PATCH 4/5] bisect--helper: add "--next-exit" to output bisect results

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 20, 2009, 08:44 UTC
Message-ID
<7vprf7k93h.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20090419115607.c7089503.chriscool@tuxfamily.org>
Christian Couder <chriscool@tuxfamily.org> writes:
Show 7 quoted lines
> The goal of this patch is to port more shell code from the "bisect_next"
> function in "git-bisect.sh" to C code in "builtin-bisect--helper.c".
>
> So we port the code that interprets the bisection result and stops or
> continues (by checking out the next revision) the bisection process.
>
> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>

Just to make sure I understand correctly, with this and patch 5/5, we can then drop the --next-vars helper command, right?

Show 9 quoted lines
> @@ -16,6 +17,12 @@ static const char **rev_argv;
>  static int rev_argv_nr;
>  static int rev_argv_alloc;
>  
> +static const unsigned char *current_bad_sha1;
> +
> +static const char *argv_diff_tree[] = {"diff-tree", "--pretty", NULL, NULL};
> +static const char *argv_checkout[] = {"checkout", "-q", NULL, "--", NULL};
> +static const char *argv_show_branch[] = {"show-branch", NULL, NULL};

I do appreciate that you kept this step in "rewrite in C" theme a straight rewrite to still call out the executables. We can turn these into internal calls in future steps, but that is a separate issue.

I suspect that the show-branch call outlived its usefulness with this patch; it will now be a low hanging fruit to call format_commit_message() internally to reduce one fork+exec.

Thanks, queued.
Previous: Christian CouderNext: Christian Couder
Message 4 of 5 in “bisect--helper: add "--next-exit" to output bisect results”
  1. 4/5 bisect--helper: add "--next-exit" to output bisect resultsChristian Couder, Apr 19, 2009
  2. Stephen BoydApr 20, 2009
  3. Christian CouderApr 21, 2009
  4. Junio C HamanoApr 20, 2009
  5. Christian CouderApr 21, 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.