Skip to content

Commit

Permalink
Merge branch 'os/bisect-runs-show-branch-without-pager' into jch
Browse files Browse the repository at this point in the history
When "git bisect" spawns "git show-branch" to pretty-print the
title of the commit to be tested, it could have invoked user's
pager if user configured to run pager while running show-branch.
The invocation of show-branch has been changed to disable pager,
even if one is configured.

* os/bisect-runs-show-branch-without-pager:
  bisect: disable pager while invoking show-branch
  • Loading branch information
gitster committed Jul 28, 2021
2 parents 42d587b + 58e3755 commit b189b04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bisect.c
Expand Up @@ -23,7 +23,7 @@ static struct oid_array skipped_revs;
static struct object_id *current_bad_oid;

static const char *argv_checkout[] = {"checkout", "-q", NULL, "--", NULL};
static const char *argv_show_branch[] = {"show-branch", NULL, NULL};
static const char *argv_show_branch[] = {"-P", "show-branch", NULL, NULL};

static const char *term_bad;
static const char *term_good;
Expand Down Expand Up @@ -748,7 +748,7 @@ static enum bisect_error bisect_checkout(const struct object_id *bisect_rev, int
return -abs(res);
}

argv_show_branch[1] = bisect_rev_hex;
argv_show_branch[2] = bisect_rev_hex;
res = run_command_v_opt(argv_show_branch, RUN_GIT_CMD);
/*
* Errors in `run_command()` itself, signaled by res < 0,
Expand Down

0 comments on commit b189b04

Please sign in to comment.