From 2c7c3877def8629278f5367a461ef269b0cfaa99 Mon Sep 17 00:00:00 2001 From: =?utf8?q?SZEDER=20G=C3=A1bor?= Date: Sun, 10 Oct 2010 23:48:58 +0200 Subject: [PATCH] bisect: check for mandatory argument of 'bisect replay' MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 'git bisect replay' has a mandatory logfile argument, but the current implementation doesn't check whether the user has specified one. When the user omits the logfile argument, this leads to the following unhelpful error message: cannot read for replaying So, check for the mandatory argument first, and provide a more meaningful error message when it is omitted. Signed-off-by: SZEDER Gábor Signed-off-by: Junio C Hamano --- git-bisect.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/git-bisect.sh b/git-bisect.sh index 68fcff6db..c21e33c8d 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -343,6 +343,7 @@ bisect_clean_state() { } bisect_replay () { + test "$#" -eq 1 || die "No logfile given" test -r "$1" || die "cannot read $1 for replaying" bisect_reset while read git bisect command rev -- 2.30.2