Skip to content

Commit

Permalink
bisect: check for mandatory argument of 'bisect replay'
Browse files Browse the repository at this point in the history
'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>
  • Loading branch information
SZEDER Gábor authored and Junio C Hamano committed Oct 13, 2010
1 parent 3bb8cf8 commit 2c7c387
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions git-bisect.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2c7c387

Please sign in to comment.