So that when they are evaled and there is an error, the result from the eval is an error. This way we should be protected from errors in the output emited by "filter_skipped". Signed-off-by: Christian Couder <chriscool@xxxxxxxxxxxxx> --- git-bisect.sh | 29 ++++++++++++++++------------- 1 files changed, 16 insertions(+), 13 deletions(-) diff --git a/git-bisect.sh b/git-bisect.sh index a9324b2..08e31d6 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -296,14 +296,14 @@ filter_skipped() { do case "$VARS,$FOUND,$TRIED,$hash" in # We display some vars. - 1,*,*,*) echo "$hash $line" ;; + 1,*,*,*) echo "$hash $line &&" ;; # Split line. ,*,*,---*) ;; # We had nothing to search. ,,,bisect_rev*) - echo "bisect_rev=" + echo "bisect_rev= &&" VARS=1 ;; @@ -311,7 +311,7 @@ filter_skipped() { # This should happen only if the "bad" # commit is also a "skip" commit. ,,*,bisect_rev*) - echo "bisect_rev='$TRIED'" + echo "bisect_rev='$TRIED' &&" VARS=1 ;; @@ -321,8 +321,8 @@ filter_skipped() { case "$_skip" in *$hash*) ;; *) - echo "bisect_rev=$hash" - echo "bisect_tried='$TRIED'" + echo "bisect_rev=$hash &&" + echo "bisect_tried='$TRIED' &&" FOUND=1 ;; esac @@ -332,16 +332,19 @@ filter_skipped() { ,1,*,bisect_rev*) VARS=1 ;; ,1,*,*) ;; - # ??? - *) die "filter_skipped error " \ - "VARS: '$VARS' " \ - "FOUND: '$FOUND' " \ - "TRIED: '$TRIED' " \ - "hash: '$hash' " \ - "line: '$line'" - ;; + # Unexpected input + *) + echo "die 'filter_skipped error'" + die "filter_skipped error " \ + "VARS: '$VARS' " \ + "FOUND: '$FOUND' " \ + "TRIED: '$TRIED' " \ + "hash: '$hash' " \ + "line: '$line'" + ;; esac done + echo ':' } exit_if_skipped_commits () { -- 1.6.2.rc1.257.g6c75 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html