author | SZEDER Gábor <szeder@ira.uka.de> | |
Sun, 10 Oct 2010 21:48:56 +0000 (23:48 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 13 Oct 2010 22:07:50 +0000 (15:07 -0700) | ||
commit | 412ff738addd3f329d641073fd1aa32629d5bfbf | |
tree | 8324b2697705014fa06a91e5beee7638b4baa0b0 | tree | snapshot |
parent | c752e7f3e8d96a9673ad248addc9418164bd3ce6 | commit | diff |
bisect: improve error message of 'bisect log' while not bisecting
'git bisect log' is implemented by a direct invocation of 'cat
"$GIT_DIR/BISECT_LOG"', without any sanity checks. Consequently,
running 'git bisect log' while not bisecting leads to an error,
because the bisect logfile doesn't exists. The accompanying error
message
cat: /path/to/repo/.git/BISECT_LOG: No such file or directory
is neither very helpful nor very friendly.
Instead of blindly trying to cat the log file, first check whether
there is a bisection going on (i.e. the bisect logfile exists), and
die with a more appropriate error message when not.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
'git bisect log' is implemented by a direct invocation of 'cat
"$GIT_DIR/BISECT_LOG"', without any sanity checks. Consequently,
running 'git bisect log' while not bisecting leads to an error,
because the bisect logfile doesn't exists. The accompanying error
message
cat: /path/to/repo/.git/BISECT_LOG: No such file or directory
is neither very helpful nor very friendly.
Instead of blindly trying to cat the log file, first check whether
there is a bisection going on (i.e. the bisect logfile exists), and
die with a more appropriate error message when not.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-bisect.sh | diff | blob | history |