From fecd2dd36e6210c0211c812f1be2a07c71c6dcdc Mon Sep 17 00:00:00 2001 From: Stephan Beyer Date: Sun, 12 Nov 2017 21:55:33 +0100 Subject: [PATCH] bisect run: die if no command is given It was possible to invoke "git bisect run" without any command. This considers all commits as good commits since "$@"'s return value for empty $@ is 0. This is most probably not what a user wants (otherwise she would invoke "git bisect run true"), so not providing a command now results in an error. Signed-off-by: Stephan Beyer Signed-off-by: Junio C Hamano --- git-bisect.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/git-bisect.sh b/git-bisect.sh index 0138a8860e..a69e436563 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -450,6 +450,8 @@ bisect_replay () { bisect_run () { bisect_next_check fail + test -n "$*" || die "$(gettext "bisect run failed: no command provided.")" + while true do command="$@"