Skip to content

Commit fecd2dd

Browse files
sbeyergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4123bca commit fecd2dd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

git-bisect.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,8 @@ bisect_replay () {
450450
bisect_run () {
451451
bisect_next_check fail
452452

453+
test -n "$*" || die "$(gettext "bisect run failed: no command provided.")"
454+
453455
while true
454456
do
455457
command="$@"

0 commit comments

Comments
 (0)