@@ -263,62 +263,74 @@ filter_skipped() {
263
263
_skip=" $2 "
264
264
265
265
if [ -z " $_skip " ]; then
266
- eval_rev_list " $_eval "
266
+ eval_rev_list " $_eval " | {
267
+ while read line
268
+ do
269
+ echo " $line &&"
270
+ done
271
+ echo ' :'
272
+ }
267
273
return
268
274
fi
269
275
270
276
# Let's parse the output of:
271
277
# "git rev-list --bisect-vars --bisect-all ..."
272
- eval_rev_list " $_eval " | while read hash line
273
- do
274
- case " $VARS ,$FOUND ,$TRIED ,$hash " in
275
- # We display some vars.
276
- 1,* ,* ,* ) echo " $hash $line " ;;
277
-
278
- # Split line.
279
- ,* ,* ,---* ) ;;
280
-
281
- # We had nothing to search.
278
+ eval_rev_list " $_eval " | {
279
+ VARS= FOUND= TRIED=
280
+ while read hash line
281
+ do
282
+ case " $VARS ,$FOUND ,$TRIED ,$hash " in
283
+ 1,* ,* ,* )
284
+ # "bisect_foo=bar" read from rev-list output.
285
+ echo " $hash &&"
286
+ ;;
287
+ ,* ,* ,---* )
288
+ # Separator
289
+ ;;
282
290
,,,bisect_rev* )
283
- echo " bisect_rev="
291
+ # We had nothing to search.
292
+ echo " bisect_rev= &&"
284
293
VARS=1
285
294
;;
286
-
287
- # We did not find a good bisect rev.
288
- # This should happen only if the "bad"
289
- # commit is also a "skip" commit.
290
295
,,* ,bisect_rev* )
291
- echo " bisect_rev=$TRIED "
296
+ # We did not find a good bisect rev.
297
+ # This should happen only if the "bad"
298
+ # commit is also a "skip" commit.
299
+ echo " bisect_rev='$TRIED ' &&"
292
300
VARS=1
293
301
;;
294
-
295
- # We are searching.
296
302
,,* ,* )
303
+ # We are searching.
297
304
TRIED=" ${TRIED: +$TRIED |} $hash "
298
305
case " $_skip " in
299
306
* $hash * ) ;;
300
307
* )
301
- echo " bisect_rev=$hash "
302
- echo " bisect_tried=\" $TRIED \" "
308
+ echo " bisect_rev=$hash && "
309
+ echo " bisect_tried=' $TRIED ' && "
303
310
FOUND=1
304
311
;;
305
312
esac
306
313
;;
307
-
308
- # We have already found a rev to be tested.
309
- ,1,* ,bisect_rev* ) VARS=1 ;;
310
- ,1,* ,* ) ;;
311
-
312
- # ???
313
- * ) die " filter_skipped error " \
314
- " VARS: '$VARS ' " \
315
- " FOUND: '$FOUND ' " \
316
- " TRIED: '$TRIED ' " \
317
- " hash: '$hash ' " \
318
- " line: '$line '"
319
- ;;
320
- esac
321
- done
314
+ ,1,* ,bisect_rev* )
315
+ # We have already found a rev to be tested.
316
+ VARS=1
317
+ ;;
318
+ ,1,* ,* )
319
+ ;;
320
+ * )
321
+ # Unexpected input
322
+ echo " die 'filter_skipped error'"
323
+ die " filter_skipped error " \
324
+ " VARS: '$VARS ' " \
325
+ " FOUND: '$FOUND ' " \
326
+ " TRIED: '$TRIED ' " \
327
+ " hash: '$hash ' " \
328
+ " line: '$line '"
329
+ ;;
330
+ esac
331
+ done
332
+ echo ' :'
333
+ }
322
334
}
323
335
324
336
exit_if_skipped_commits () {
0 commit comments