From f88851c6376f0b2a4cf87c061a848e4ae4438e0a Mon Sep 17 00:00:00 2001 From: Kevin Daudt Date: Thu, 19 Mar 2015 23:14:08 +0100 Subject: rev-list: refuse --first-parent combined with --bisect rev-list --bisect is used by git bisect, but never together with --first-parent. Because rev-list --bisect together with --first-parent is not handled currently, and even leads to segfaults, refuse to use both options together. Because this is not supported, it makes little sense to use git log --bisect --first parent either, because refs/heads/bad is not limited to the first parent chain. Helped-by: Junio C. Hamano Helped-by: Eric Sunshine Signed-off-by: Kevin Daudt Signed-off-by: Junio C Hamano --- revision.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'revision.c') diff --git a/revision.c b/revision.c index 2571ada6bf..161cf73b10 100644 --- a/revision.c +++ b/revision.c @@ -2273,6 +2273,9 @@ 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")); + return left; } -- cgit v1.2.1