Bisect: fix some white spaces and empty lines breakages.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
parent
3ac9f612cb
commit
8fe26f4481
@ -64,7 +64,7 @@ bisect_start() {
|
|||||||
branch=`cat "$GIT_DIR/head-name"`
|
branch=`cat "$GIT_DIR/head-name"`
|
||||||
else
|
else
|
||||||
branch=master
|
branch=master
|
||||||
fi
|
fi
|
||||||
git checkout $branch || exit
|
git checkout $branch || exit
|
||||||
;;
|
;;
|
||||||
refs/heads/*)
|
refs/heads/*)
|
||||||
@ -95,11 +95,11 @@ bisect_start() {
|
|||||||
arg="$1"
|
arg="$1"
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
--)
|
--)
|
||||||
shift
|
shift
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
rev=$(git rev-parse --verify "$arg^{commit}" 2>/dev/null) || {
|
rev=$(git rev-parse --verify "$arg^{commit}" 2>/dev/null) || {
|
||||||
test $has_double_dash -eq 1 &&
|
test $has_double_dash -eq 1 &&
|
||||||
die "'$arg' does not appear to be a valid revision"
|
die "'$arg' does not appear to be a valid revision"
|
||||||
break
|
break
|
||||||
@ -110,10 +110,10 @@ bisect_start() {
|
|||||||
else
|
else
|
||||||
bisect_write_good "$rev"
|
bisect_write_good "$rev"
|
||||||
fi
|
fi
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
sq "$@" >"$GIT_DIR/BISECT_NAMES"
|
sq "$@" >"$GIT_DIR/BISECT_NAMES"
|
||||||
echo "git-bisect start$orig_args" >>"$GIT_DIR/BISECT_LOG"
|
echo "git-bisect start$orig_args" >>"$GIT_DIR/BISECT_LOG"
|
||||||
@ -143,7 +143,7 @@ bisect_write_bad() {
|
|||||||
|
|
||||||
bisect_good() {
|
bisect_good() {
|
||||||
bisect_autostart
|
bisect_autostart
|
||||||
case "$#" in
|
case "$#" in
|
||||||
0) revs=$(git rev-parse --verify HEAD) || exit ;;
|
0) revs=$(git rev-parse --verify HEAD) || exit ;;
|
||||||
*) revs=$(git rev-parse --revs-only --no-flags "$@") &&
|
*) revs=$(git rev-parse --revs-only --no-flags "$@") &&
|
||||||
test '' != "$revs" || die "Bad rev input: $@" ;;
|
test '' != "$revs" || die "Bad rev input: $@" ;;
|
||||||
@ -153,7 +153,6 @@ bisect_good() {
|
|||||||
rev=$(git rev-parse --verify "$rev^{commit}") || exit
|
rev=$(git rev-parse --verify "$rev^{commit}") || exit
|
||||||
bisect_write_good "$rev"
|
bisect_write_good "$rev"
|
||||||
echo "git-bisect good $rev" >>"$GIT_DIR/BISECT_LOG"
|
echo "git-bisect good $rev" >>"$GIT_DIR/BISECT_LOG"
|
||||||
|
|
||||||
done
|
done
|
||||||
bisect_auto_next
|
bisect_auto_next
|
||||||
}
|
}
|
||||||
@ -207,7 +206,7 @@ bisect_auto_next() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bisect_next() {
|
bisect_next() {
|
||||||
case "$#" in 0) ;; *) usage ;; esac
|
case "$#" in 0) ;; *) usage ;; esac
|
||||||
bisect_autostart
|
bisect_autostart
|
||||||
bisect_next_check good
|
bisect_next_check good
|
||||||
|
|
||||||
@ -255,7 +254,7 @@ bisect_reset() {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
branch="$1" ;;
|
branch="$1" ;;
|
||||||
*)
|
*)
|
||||||
usage ;;
|
usage ;;
|
||||||
esac
|
esac
|
||||||
if git checkout "$branch"; then
|
if git checkout "$branch"; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user