@@ -290,56 +290,62 @@ filter_skipped() {
290290
291291 # Let's parse the output of:
292292 # "git rev-list --bisect-vars --bisect-all ..."
293- eval " $_eval " | while read hash line
294- do
295- case " $VARS ,$FOUND ,$TRIED ,$hash " in
296- # We display some vars.
297- 1,* ,* ,* ) echo " $hash $line " ;;
298-
299- # Split line.
300- ,* ,* ,---* ) ;;
301-
302- # We had nothing to search.
293+ eval " $_eval " | {
294+ VARS= FOUND= TRIED=
295+ while read hash line
296+ do
297+ case " $VARS ,$FOUND ,$TRIED ,$hash " in
298+ 1,* ,* ,* )
299+ # "bisect_foo=bar" read from rev-list output.
300+ echo " $hash &&"
301+ ;;
302+ ,* ,* ,---* )
303+ # Separator
304+ ;;
303305 ,,,bisect_rev* )
304- echo " bisect_rev="
306+ # We had nothing to search.
307+ echo " bisect_rev= &&"
305308 VARS=1
306309 ;;
307-
308- # We did not find a good bisect rev.
309- # This should happen only if the "bad"
310- # commit is also a "skip" commit.
311310 ,,* ,bisect_rev* )
312- echo " bisect_rev=$TRIED "
311+ # We did not find a good bisect rev.
312+ # This should happen only if the "bad"
313+ # commit is also a "skip" commit.
314+ echo " bisect_rev='$TRIED ' &&"
313315 VARS=1
314316 ;;
315-
316- # We are searching.
317317 ,,* ,* )
318+ # We are searching.
318319 TRIED=" ${TRIED: +$TRIED |} $hash "
319320 case " $_skip " in
320321 * $hash * ) ;;
321322 * )
322- echo " bisect_rev=$hash "
323- echo " bisect_tried=\" $TRIED \" "
323+ echo " bisect_rev=$hash && "
324+ echo " bisect_tried=' $TRIED ' && "
324325 FOUND=1
325326 ;;
326327 esac
327328 ;;
328-
329- # We have already found a rev to be tested.
330- ,1,* ,bisect_rev* ) VARS=1 ;;
331- ,1,* ,* ) ;;
332-
333- # ???
334- * ) die " filter_skipped error " \
335- " VARS: '$VARS ' " \
336- " FOUND: '$FOUND ' " \
337- " TRIED: '$TRIED ' " \
338- " hash: '$hash ' " \
339- " line: '$line '"
340- ;;
341- esac
342- done
329+ ,1,* ,bisect_rev* )
330+ # We have already found a rev to be tested.
331+ VARS=1
332+ ;;
333+ ,1,* ,* )
334+ ;;
335+ * )
336+ # Unexpected input
337+ echo " die 'filter_skipped error'"
338+ die " filter_skipped error " \
339+ " VARS: '$VARS ' " \
340+ " FOUND: '$FOUND ' " \
341+ " TRIED: '$TRIED ' " \
342+ " hash: '$hash ' " \
343+ " line: '$line '"
344+ ;;
345+ esac
346+ done
347+ echo ' :'
348+ }
343349}
344350
345351exit_if_skipped_commits () {
0 commit comments