bisect: check for mandatory argument of 'bisect replay'
'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 <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
SZEDER Gábor committed
Oct 10, 2010 at 23:48 UTC
2c7c3877def8629278f5367a461ef269b0cfaa99
1 file changed
+1
git-bisect.sh
+1
@@ -343,6 +343,7 @@ bisect_clean_state() {
343
}
344
345
bisect_replay () {
346
+ test "$#" -eq 1 || die "No logfile given"
347
test -r "$1" || die "cannot read $1 for replaying"
348
bisect_reset
349
while read git bisect command rev