Skip to content

Introduce --first-parent flag for git bisect #686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion Documentation/git-bisect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The command takes various subcommands, and different options depending
on the subcommand:

git bisect start [--term-{old,good}=<term> --term-{new,bad}=<term>]
[--no-checkout] [<bad> [<good>...]] [--] [<paths>...]
[--no-checkout] [--first-parent] [<bad> [<good>...]] [--] [<paths>...]
git bisect (bad|new|<term-new>) [<rev>]
git bisect (good|old|<term-old>) [<rev>...]
git bisect terms [--term-good | --term-bad]
Expand Down Expand Up @@ -365,6 +365,17 @@ does not require a checked out tree.
+
If the repository is bare, `--no-checkout` is assumed.

--first-parent::
+
Follow only the first parent commit upon seeing a merge commit.
+
In detecting regressions introduced through the merging of a branch, the merge
commit will be identified as introduction of the bug and its ancestors will be
ignored.
+
This option is particularly useful in avoiding false positives when a merged
branch contained broken or non-buildable commits, but the merge itself was OK.

EXAMPLES
--------

Expand Down
7 changes: 3 additions & 4 deletions Documentation/rev-list-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ parents) and `--max-parents=-1` (negative numbers denote no upper limit).
because merges into a topic branch tend to be only about
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Junio C Hamano wrote (reply to this):

"Aaron Lipman via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Aaron Lipman <alipman88@gmail.com>
>
> Add first_parent_only parameter to find_bisection(), removing the
> barrier that prevented combining the --bisect and --first-parent flags
> when using git rev-list
>
> Signed-off-by: Aaron Lipman <alipman88@gmail.com>
> Based-on-patch-by: Tiago Botelho <tiagonbotelho@hotmail.com>

In chronological order, please.

> diff --git a/bisect.c b/bisect.c
> index d5e830410f..762f68c8e9 100644
> --- a/bisect.c
> +++ b/bisect.c
> @@ -37,7 +37,7 @@ static const char *term_good;
>   * We care just barely enough to avoid recursing for
>   * non-merge entries.
>   */
> -static int count_distance(struct commit_list *entry)
> +static int count_distance(struct commit_list *entry, int first_parent_only)
>  {
>  	int nr = 0;
>  
> @@ -52,10 +52,10 @@ static int count_distance(struct commit_list *entry)
>  		commit->object.flags |= COUNTED;
>  		p = commit->parents;
>  		entry = p;
> -		if (p) {
> +		if (p && !first_parent_only) {
>  			p = p->next;
>  			while (p) {
> -				nr += count_distance(p);
> +				nr += count_distance(p, first_parent_only);
>  				p = p->next;
>  			}
>  		}

If you are running a first-parent-only bisection, by default, each
commit in the "goodness not yet known" region is treated as a single
parent commit for the purpose of bisection.  As do_find_bisection()
avoids the cost of calling stupid-and-expensive count_distance() by
treating such a single-strand-of-pearls specially, wouldn't it be a
BUG() if this funtion is called under first_parent_only mode in the
first place?

> @@ -88,15 +88,16 @@ static inline void weight_set(struct commit_list *elem, int weight)
>  	**commit_weight_at(&commit_weight, elem->item) = weight;
>  }


> -static int count_interesting_parents(struct commit *commit)
> +static int count_interesting_parents(struct commit *commit, int first_parent_only)
>  {
>  	struct commit_list *p;
>  	int count;
>  
>  	for (count = 0, p = commit->parents; p; p = p->next) {
> -		if (p->item->object.flags & UNINTERESTING)
> -			continue;
> -		count++;
> +		if (!(p->item->object.flags & UNINTERESTING))
> +			count++;
> +		if (first_parent_only)
> +			break;
>  	}
>  	return count;
>  }

Any merge will be checked for interesting-ness of its first parent;
there is either zero or one interesting parent and no other case
under first-parent-only.  OK.

> @@ -259,7 +260,7 @@ static struct commit_list *best_bisection_sorted(struct commit_list *list, int n
>   */
>  static struct commit_list *do_find_bisection(struct commit_list *list,
>  					     int nr, int *weights,
> -					     int find_all)
> +					     int find_all, int first_parent_only)
>  {
>  	int n, counted;
>  	struct commit_list *p;
> @@ -271,7 +272,7 @@ static struct commit_list *do_find_bisection(struct commit_list *list,
>  		unsigned flags = commit->object.flags;
>  
>  		*commit_weight_at(&commit_weight, p->item) = &weights[n++];
> -		switch (count_interesting_parents(commit)) {
> +		switch (count_interesting_parents(commit, first_parent_only)) {
>  		case 0:
>  			if (!(flags & TREESAME)) {
>  				weight_set(p, 1);
> @@ -314,7 +315,7 @@ static struct commit_list *do_find_bisection(struct commit_list *list,
>  			continue;
>  		if (weight(p) != -2)
>  			continue;

If count-interesting-parents can never be 2 or more, you will never
see weight(p) == -2 (see the switch statement in the previous hunk).

So it your first-parent-only mode allowed this continue not to
trigger, you have a BUG(), I think.

> -		weight_set(p, count_distance(p));
> +		weight_set(p, count_distance(p, first_parent_only));

Hence, you do not need to touch count_distance() at all, no?

> @@ -330,13 +331,21 @@ static struct commit_list *do_find_bisection(struct commit_list *list,
>  			struct commit_list *q;
>  			unsigned flags = p->item->object.flags;
>  
> +			/* if commit p has already been weighted, continue. */
>  			if (0 <= weight(p))
>  				continue;
> +
> +			/*
> +			 * otherwise, find the first interesting
> +			 * already-weighted parent of p and store as q.
> +			 */

Unnecessary changes above.

>  			for (q = p->item->parents; q; q = q->next) {
> -				if (q->item->object.flags & UNINTERESTING)
> -					continue;
> -				if (0 <= weight(q))
> +				if (!(q->item->object.flags & UNINTERESTING) && 0 <= weight(q)) {
> +					break;

Overlong line.  Fold it after "&&", like this:

				if (!(q->item->object.flags & UNINTERESTING) &&
				    0 <= weight(q)) {

What is this change about?

Ah, if the first parent is uninteresting, we do not want to
continue, but with the original loop, we may go on and check
q->next.  We just want to break out of the loop instead.

I strongly suspect that

			for (q = p->item->parents;
			     q;
			     q = first_parent_only ? NULL : q->next) {

without any change inside the loop is much easier to reason about.
We follow exactly the same logic as the usual case.  We just pretend
that all commits have only one single parent which is the first one.

Thanks.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the Git mailing list, Junio C Hamano wrote (reply to this):

Taking all the suggestions and speculations I made in the message I
am responding to, I think squashing the following changes into the
[PATCH 1/3] would make the code simpler and much easier to follow.

The first two hunks revert the changes made to count_distance(); the
third hunk makes sure that count_distance() is not called under the
first-parent mode, since the "single-strand-of-pearls" optimization
is the only counting method needed in the first-parent mode.  The
last hunk is to revert the changes to the single-strand-of-pearls
optimized counting and tweak the loop control to take only the first
parent into account.

Your new tests in 6000 and 6002 of course still pass with this
clean-up.

 bisect.c | 27 ++++++++++++---------------
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/bisect.c b/bisect.c
index 762f68c8e9..a11fdb1473 100644
--- a/bisect.c
+++ b/bisect.c
@@ -37,7 +37,7 @@ static const char *term_good;
  * We care just barely enough to avoid recursing for
  * non-merge entries.
  */
-static int count_distance(struct commit_list *entry, int first_parent_only)
+static int count_distance(struct commit_list *entry)
 {
 	int nr = 0;
 
@@ -52,10 +52,10 @@ static int count_distance(struct commit_list *entry, int first_parent_only)
 		commit->object.flags |= COUNTED;
 		p = commit->parents;
 		entry = p;
-		if (p && !first_parent_only) {
+		if (p) {
 			p = p->next;
 			while (p) {
-				nr += count_distance(p, first_parent_only);
+				nr += count_distance(p);
 				p = p->next;
 			}
 		}
@@ -315,7 +315,9 @@ static struct commit_list *do_find_bisection(struct commit_list *list,
 			continue;
 		if (weight(p) != -2)
 			continue;
-		weight_set(p, count_distance(p, first_parent_only));
+		if (first_parent_only)
+			BUG("shouldn't be calling count-distance in fp mode");
+		weight_set(p, count_distance(p));
 		clear_distance(list);
 
 		/* Does it happen to be at exactly half-way? */
@@ -331,21 +333,16 @@ static struct commit_list *do_find_bisection(struct commit_list *list,
 			struct commit_list *q;
 			unsigned flags = p->item->object.flags;
 
-			/* if commit p has already been weighted, continue. */
 			if (0 <= weight(p))
 				continue;
 
-			/*
-			 * otherwise, find the first interesting
-			 * already-weighted parent of p and store as q.
-			 */
-			for (q = p->item->parents; q; q = q->next) {
-				if (!(q->item->object.flags & UNINTERESTING) && 0 <= weight(q)) {
-					break;
-				} else if (first_parent_only) {
-					q = NULL;
+			for (q = p->item->parents;
+			     q;
+			     q = first_parent_only ? NULL : q->next) {
+				if (q->item->object.flags & UNINTERESTING)
+					continue;
+				if (0 <= weight(q))
 					break;
-				}
 			}
 			if (!q)
 				continue;


adjusting to updated upstream from time to time, and
this option allows you to ignore the individual commits
brought in to your history by such a merge. Cannot be
combined with --bisect.
brought in to your history by such a merge.

--not::
Reverses the meaning of the '{caret}' prefix (or lack thereof)
Expand Down Expand Up @@ -207,7 +206,7 @@ ifndef::git-rev-list[]
Pretend as if the bad bisection ref `refs/bisect/bad`
was listed and as if it was followed by `--not` and the good
bisection refs `refs/bisect/good-*` on the command
line. Cannot be combined with --first-parent.
line.
endif::git-rev-list[]

--stdin::
Expand Down Expand Up @@ -743,7 +742,7 @@ outputs 'midpoint', the output of the two commands
would be of roughly the same length. Finding the change which
introduces a regression is thus reduced to a binary search: repeatedly
generate and test new 'midpoint's until the commit chain is of length
one. Cannot be combined with --first-parent.
one.

--bisect-vars::
This calculates the same as `--bisect`, except that refs in
Expand Down
66 changes: 46 additions & 20 deletions bisect.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static const char *term_good;
* We care just barely enough to avoid recursing for
* non-merge entries.
*/
static int count_distance(struct commit_list *entry)
static int count_distance(struct commit_list *entry, unsigned bisect_flags)
{
int nr = 0;

Expand All @@ -52,10 +52,10 @@ static int count_distance(struct commit_list *entry)
commit->object.flags |= COUNTED;
p = commit->parents;
entry = p;
if (p) {
if (p && !(bisect_flags & BISECT_FIRST_PARENT)) {
p = p->next;
while (p) {
nr += count_distance(p);
nr += count_distance(p, bisect_flags);
p = p->next;
}
}
Expand Down Expand Up @@ -88,15 +88,16 @@ static inline void weight_set(struct commit_list *elem, int weight)
**commit_weight_at(&commit_weight, elem->item) = weight;
}

static int count_interesting_parents(struct commit *commit)
static int count_interesting_parents(struct commit *commit, unsigned bisect_flags)
{
struct commit_list *p;
int count;

for (count = 0, p = commit->parents; p; p = p->next) {
if (p->item->object.flags & UNINTERESTING)
continue;
count++;
if (!(p->item->object.flags & UNINTERESTING))
count++;
if (bisect_flags & BISECT_FIRST_PARENT)
break;
}
return count;
}
Expand Down Expand Up @@ -259,7 +260,7 @@ static struct commit_list *best_bisection_sorted(struct commit_list *list, int n
*/
static struct commit_list *do_find_bisection(struct commit_list *list,
int nr, int *weights,
int find_all)
unsigned bisect_flags)
{
int n, counted;
struct commit_list *p;
Expand All @@ -271,7 +272,7 @@ static struct commit_list *do_find_bisection(struct commit_list *list,
unsigned flags = commit->object.flags;

*commit_weight_at(&commit_weight, p->item) = &weights[n++];
switch (count_interesting_parents(commit)) {
switch (count_interesting_parents(commit, bisect_flags)) {
case 0:
if (!(flags & TREESAME)) {
weight_set(p, 1);
Expand Down Expand Up @@ -314,11 +315,11 @@ static struct commit_list *do_find_bisection(struct commit_list *list,
continue;
if (weight(p) != -2)
continue;
weight_set(p, count_distance(p));
weight_set(p, count_distance(p, bisect_flags));
clear_distance(list);

/* Does it happen to be at exactly half-way? */
if (!find_all && halfway(p, nr))
if (!(bisect_flags & BISECT_FIND_ALL) && halfway(p, nr))
return p;
counted++;
}
Expand All @@ -330,13 +331,21 @@ static struct commit_list *do_find_bisection(struct commit_list *list,
struct commit_list *q;
unsigned flags = p->item->object.flags;

/* if commit p has already been weighted, continue. */
if (0 <= weight(p))
continue;

/*
* otherwise, find the first interesting
* already-weighted parent of p and store as q.
*/
for (q = p->item->parents; q; q = q->next) {
if (q->item->object.flags & UNINTERESTING)
continue;
if (0 <= weight(q))
if (!(q->item->object.flags & UNINTERESTING) && 0 <= weight(q)) {
break;
} else if (bisect_flags & BISECT_FIRST_PARENT) {
q = NULL;
break;
}
}
if (!q)
continue;
Expand All @@ -356,21 +365,21 @@ static struct commit_list *do_find_bisection(struct commit_list *list,
weight_set(p, weight(q));

/* Does it happen to be at exactly half-way? */
if (!find_all && halfway(p, nr))
if (!(bisect_flags & BISECT_FIND_ALL) && halfway(p, nr))
return p;
}
}

show_list("bisection 2 counted all", counted, nr, list);

if (!find_all)
if (!(bisect_flags & BISECT_FIND_ALL))
return best_bisection(list, nr);
else
return best_bisection_sorted(list, nr);
}

void find_bisection(struct commit_list **commit_list, int *reaches,
int *all, int find_all)
int *all, unsigned bisect_flags)
{
int nr, on_list;
struct commit_list *list, *p, *best, *next, *last;
Expand Down Expand Up @@ -406,9 +415,9 @@ void find_bisection(struct commit_list **commit_list, int *reaches,
weights = xcalloc(on_list, sizeof(*weights));

/* Do the real work of finding bisection commit. */
best = do_find_bisection(list, nr, weights, find_all);
best = do_find_bisection(list, nr, weights, bisect_flags);
if (best) {
if (!find_all) {
if (!(bisect_flags & BISECT_FIND_ALL)) {
list->item = best->item;
free_commit_list(list->next);
best = list;
Expand Down Expand Up @@ -454,6 +463,7 @@ static GIT_PATH_FUNC(git_path_bisect_run, "BISECT_RUN")
static GIT_PATH_FUNC(git_path_bisect_start, "BISECT_START")
static GIT_PATH_FUNC(git_path_bisect_log, "BISECT_LOG")
static GIT_PATH_FUNC(git_path_bisect_terms, "BISECT_TERMS")
static GIT_PATH_FUNC(git_path_bisect_first_parent, "BISECT_FIRST_PARENT")
static GIT_PATH_FUNC(git_path_head_name, "head-name")

static void read_bisect_paths(struct argv_array *array)
Expand Down Expand Up @@ -975,6 +985,12 @@ void read_bisect_terms(const char **read_bad, const char **read_good)
fclose(fp);
}

int read_first_parent_option(void)
{
const char *filename = git_path_bisect_first_parent();
return !access(filename, F_OK);
}

/*
* We use the convention that return BISECT_INTERNAL_SUCCESS_1ST_BAD_FOUND (-10) means
* the bisection process finished successfully.
Expand All @@ -991,21 +1007,30 @@ enum bisect_error bisect_next_all(struct repository *r, const char *prefix, int
enum bisect_error res = BISECT_OK;
struct object_id *bisect_rev;
char *steps_msg;
unsigned bisect_flags = 0;

read_bisect_terms(&term_bad, &term_good);
if (read_bisect_refs())
die(_("reading bisect refs failed"));

if (read_first_parent_option())
bisect_flags |= BISECT_FIRST_PARENT;

if (!!skipped_revs.nr)
bisect_flags |= BISECT_FIND_ALL;

res = check_good_are_ancestors_of_bad(r, prefix, no_checkout);
if (res)
return res;

bisect_rev_setup(r, &revs, prefix, "%s", "^%s", 1);

revs.first_parent_only = !!(bisect_flags & BISECT_FIRST_PARENT);
revs.limited = 1;

bisect_common(&revs);

find_bisection(&revs.commits, &reaches, &all, !!skipped_revs.nr);
find_bisection(&revs.commits, &reaches, &all, bisect_flags);
revs.commits = managed_skipped(revs.commits, &tried);

if (!revs.commits) {
Expand Down Expand Up @@ -1133,6 +1158,7 @@ int bisect_clean_state(void)
unlink_or_warn(git_path_bisect_names());
unlink_or_warn(git_path_bisect_run());
unlink_or_warn(git_path_bisect_terms());
unlink_or_warn(git_path_bisect_first_parent());
/* Cleanup head-name if it got left by an old version of git-bisect */
unlink_or_warn(git_path_head_name());
/*
Expand Down
7 changes: 6 additions & 1 deletion bisect.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct repository;
* best commit, as chosen by `find_all`.
*/
void find_bisection(struct commit_list **list, int *reaches, int *all,
int find_all);
unsigned bisect_flags);

struct commit_list *filter_skipped(struct commit_list *list,
struct commit_list **tried,
Expand All @@ -23,6 +23,9 @@ struct commit_list *filter_skipped(struct commit_list *list,
#define BISECT_SHOW_ALL (1<<0)
#define REV_LIST_QUIET (1<<1)

#define BISECT_FIND_ALL (1u<<0)
#define BISECT_FIRST_PARENT (1u<<1)

struct rev_list_info {
struct rev_info *revs;
int flags;
Expand Down Expand Up @@ -66,6 +69,8 @@ int estimate_bisect_steps(int all);

void read_bisect_terms(const char **bad, const char **good);

int read_first_parent_option(void);

int bisect_clean_state(void);

#endif
16 changes: 12 additions & 4 deletions builtin/bisect--helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ static GIT_PATH_FUNC(git_path_bisect_head, "BISECT_HEAD")
static GIT_PATH_FUNC(git_path_bisect_log, "BISECT_LOG")
static GIT_PATH_FUNC(git_path_head_name, "head-name")
static GIT_PATH_FUNC(git_path_bisect_names, "BISECT_NAMES")
static GIT_PATH_FUNC(git_path_bisect_first_parent, "BISECT_FIRST_PARENT")

static const char * const git_bisect_helper_usage[] = {
N_("git bisect--helper --next-all [--no-checkout]"),
Expand All @@ -28,7 +29,7 @@ static const char * const git_bisect_helper_usage[] = {
N_("git bisect--helper --bisect-next-check <good_term> <bad_term> [<term>]"),
N_("git bisect--helper --bisect-terms [--term-good | --term-old | --term-bad | --term-new]"),
N_("git bisect--helper --bisect-start [--term-{old,good}=<term> --term-{new,bad}=<term>]"
"[--no-checkout] [<bad> [<good>...]] [--] [<paths>...]"),
" [--no-checkout] [--first-parent] [<bad> [<good>...]] [--] [<paths>...]"),
NULL
};

Expand Down Expand Up @@ -422,7 +423,7 @@ static int bisect_append_log_quoted(const char **argv)
}

static int bisect_start(struct bisect_terms *terms, int no_checkout,
const char **argv, int argc)
int first_parent_only, const char **argv, int argc)
{
int i, has_double_dash = 0, must_write_terms = 0, bad_seen = 0;
int flags, pathspec_pos, res = 0;
Expand Down Expand Up @@ -453,6 +454,8 @@ static int bisect_start(struct bisect_terms *terms, int no_checkout,
break;
} else if (!strcmp(arg, "--no-checkout")) {
no_checkout = 1;
} else if (!strcmp(arg, "--first-parent")) {
first_parent_only = 1;
} else if (!strcmp(arg, "--term-good") ||
!strcmp(arg, "--term-old")) {
i++;
Expand Down Expand Up @@ -577,6 +580,9 @@ static int bisect_start(struct bisect_terms *terms, int no_checkout,
*/
write_file(git_path_bisect_start(), "%s\n", start_head.buf);

if (first_parent_only)
write_file(git_path_bisect_first_parent(), "\n");

if (no_checkout) {
if (get_oid(start_head.buf, &oid) < 0) {
res = error(_("invalid ref: '%s'"), start_head.buf);
Expand Down Expand Up @@ -632,7 +638,7 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
BISECT_TERMS,
BISECT_START
} cmdmode = 0;
int no_checkout = 0, res = 0, nolog = 0;
int no_checkout = 0, first_parent_only = 0, res = 0, nolog = 0;
struct option options[] = {
OPT_CMDMODE(0, "next-all", &cmdmode,
N_("perform 'git bisect next'"), NEXT_ALL),
Expand All @@ -656,6 +662,8 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
N_("start the bisect session"), BISECT_START),
OPT_BOOL(0, "no-checkout", &no_checkout,
N_("update BISECT_HEAD instead of checking out the current commit")),
OPT_BOOL(0, "first-parent", &first_parent_only,
N_("only trace the first parent of merge commits")),
OPT_BOOL(0, "no-log", &nolog,
N_("no log for BISECT_WRITE")),
OPT_END()
Expand Down Expand Up @@ -713,7 +721,7 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix)
break;
case BISECT_START:
set_terms(&terms, "bad", "good");
res = bisect_start(&terms, no_checkout, argv, argc);
res = bisect_start(&terms, no_checkout, first_parent_only, argv, argc);
break;
default:
return error("BUG: unknown subcommand '%d'", cmdmode);
Expand Down
9 changes: 8 additions & 1 deletion builtin/rev-list.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,15 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)

if (bisect_list) {
int reaches, all;
unsigned bisect_flags = 0;

find_bisection(&revs.commits, &reaches, &all, bisect_find_all);
if (bisect_find_all)
bisect_flags |= BISECT_FIND_ALL;

if (revs.first_parent_only)
bisect_flags |= BISECT_FIRST_PARENT;

find_bisection(&revs.commits, &reaches, &all, bisect_flags);

if (bisect_show_vars)
return show_bisect_vars(&info, reaches, all);
Expand Down
3 changes: 0 additions & 3 deletions revision.c
Original file line number Diff line number Diff line change
Expand Up @@ -2869,9 +2869,6 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
if (!revs->reflog_info && revs->grep_filter.use_reflog_filter)
die("cannot use --grep-reflog without --walk-reflogs");

if (revs->first_parent_only && revs->bisect)
die(_("--first-parent is incompatible with --bisect"));

if (revs->line_level_traverse &&
(revs->diffopt.output_format & ~(DIFF_FORMAT_PATCH | DIFF_FORMAT_NO_OUTPUT)))
die(_("-L does not yet support diff formats besides -p and -s"));
Expand Down
4 changes: 2 additions & 2 deletions t/t6000-rev-list-misc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ test_expect_success 'rev-list can negate index objects' '
test_cmp expect actual
'

test_expect_success '--bisect and --first-parent can not be combined' '
test_must_fail git rev-list --bisect --first-parent HEAD
test_expect_success '--bisect and --first-parent can be combined' '
git rev-list --bisect --first-parent HEAD
'

test_expect_success '--header shows a NUL after each commit' '
Expand Down
Loading