Merge branch 'sg/bisect'
* sg/bisect: bisect: check for mandatory argument of 'bisect replay' bisect: improve error msg of 'bisect reset' when original HEAD is deleted bisect: improve error message of 'bisect log' while not bisecting
This commit is contained in:
commit
10793e6957
@ -316,7 +316,12 @@ bisect_reset() {
|
|||||||
*)
|
*)
|
||||||
usage ;;
|
usage ;;
|
||||||
esac
|
esac
|
||||||
git checkout "$branch" -- && bisect_clean_state
|
if git checkout "$branch" -- ; then
|
||||||
|
bisect_clean_state
|
||||||
|
else
|
||||||
|
die "Could not check out original HEAD '$branch'." \
|
||||||
|
"Try 'git bisect reset <commit>'."
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
bisect_clean_state() {
|
bisect_clean_state() {
|
||||||
@ -338,6 +343,7 @@ bisect_clean_state() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bisect_replay () {
|
bisect_replay () {
|
||||||
|
test "$#" -eq 1 || die "No logfile given"
|
||||||
test -r "$1" || die "cannot read $1 for replaying"
|
test -r "$1" || die "cannot read $1 for replaying"
|
||||||
bisect_reset
|
bisect_reset
|
||||||
while read git bisect command rev
|
while read git bisect command rev
|
||||||
@ -412,6 +418,10 @@ bisect_run () {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bisect_log () {
|
||||||
|
test -s "$GIT_DIR/BISECT_LOG" || die "We are not bisecting."
|
||||||
|
cat "$GIT_DIR/BISECT_LOG"
|
||||||
|
}
|
||||||
|
|
||||||
case "$#" in
|
case "$#" in
|
||||||
0)
|
0)
|
||||||
@ -438,7 +448,7 @@ case "$#" in
|
|||||||
replay)
|
replay)
|
||||||
bisect_replay "$@" ;;
|
bisect_replay "$@" ;;
|
||||||
log)
|
log)
|
||||||
cat "$GIT_DIR/BISECT_LOG" ;;
|
bisect_log ;;
|
||||||
run)
|
run)
|
||||||
bisect_run "$@" ;;
|
bisect_run "$@" ;;
|
||||||
*)
|
*)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user