Merge branch 'cw/bisect-replay-with-dos'
"git bisect replay" had trouble with input files when they used CRLF line ending, which has been corrected. * cw/bisect-replay-with-dos: bisect: allow CRLF line endings in "git bisect replay" inputmaint
commit
f9dbe28d62
|
@ -209,6 +209,7 @@ bisect_replay () {
|
||||||
test "$#" -eq 1 || die "$(gettext "No logfile given")"
|
test "$#" -eq 1 || die "$(gettext "No logfile given")"
|
||||||
test -r "$file" || die "$(eval_gettext "cannot read \$file for replaying")"
|
test -r "$file" || die "$(eval_gettext "cannot read \$file for replaying")"
|
||||||
git bisect--helper --bisect-reset || exit
|
git bisect--helper --bisect-reset || exit
|
||||||
|
oIFS="$IFS" IFS="$IFS$(printf '\015')"
|
||||||
while read git bisect command rev
|
while read git bisect command rev
|
||||||
do
|
do
|
||||||
test "$git $bisect" = "git bisect" || test "$git" = "git-bisect" || continue
|
test "$git $bisect" = "git bisect" || test "$git" = "git-bisect" || continue
|
||||||
|
@ -232,6 +233,7 @@ bisect_replay () {
|
||||||
die "$(gettext "?? what are you talking about?")" ;;
|
die "$(gettext "?? what are you talking about?")" ;;
|
||||||
esac
|
esac
|
||||||
done <"$file"
|
done <"$file"
|
||||||
|
IFS="$oIFS"
|
||||||
bisect_auto_next
|
bisect_auto_next
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -792,6 +792,13 @@ test_expect_success 'bisect replay with old and new' '
|
||||||
git bisect reset
|
git bisect reset
|
||||||
'
|
'
|
||||||
|
|
||||||
|
test_expect_success 'bisect replay with CRLF log' '
|
||||||
|
append_cr <log_to_replay.txt >log_to_replay_crlf.txt &&
|
||||||
|
git bisect replay log_to_replay_crlf.txt >bisect_result_crlf &&
|
||||||
|
grep "$HASH2 is the first new commit" bisect_result_crlf &&
|
||||||
|
git bisect reset
|
||||||
|
'
|
||||||
|
|
||||||
test_expect_success 'bisect cannot mix old/new and good/bad' '
|
test_expect_success 'bisect cannot mix old/new and good/bad' '
|
||||||
git bisect start &&
|
git bisect start &&
|
||||||
git bisect bad $HASH4 &&
|
git bisect bad $HASH4 &&
|
||||||
|
|
Loading…
Reference in New Issue