On Sat, Jan 30, 2021 at 2:46 AM Đoàn Trần Công Danh
[off-list ref] wrote:
quoted
@@ -210,7 +205,7 @@ case "$#" in
replay)
bisect_replay "$@" ;;
log)
- bisect_log ;;
+ git bisect--helper --bisect-log || exit ;;
The original code was "die" when no bisect_log available.
I think we need to "exit 1" here to indicate a failure, i.e.
git bisect--helper --bisect-log || exit 1 ;;
Actually:
git bisect--helper --bisect-log || exit ;;
will indicate failure. See:
$ ( false || exit )
$ echo $?
1
The difference with what you suggest is that the exit code will be the
same instead of always 1:
$ ( ( exit 4 ) || exit )
echo $?
4
which is a good thing, as die() exits with code 128, so if `git
bisect--helper --bisect-log` die()s then we will get a 128 exit code
with `|| exit` instead of 1 with `|| exit 1`.
Thanks for your review,
Christian.