Skip to content

Commit 2c7c387

Browse files
szedergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3bb8cf8 commit 2c7c387

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

git-bisect.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ bisect_clean_state() {
343343
}
344344

345345
bisect_replay () {
346+
test "$#" -eq 1 || die "No logfile given"
346347
test -r "$1" || die "cannot read $1 for replaying"
347348
bisect_reset
348349
while read git bisect command rev

0 commit comments

Comments
 (0)