Code

grep: accept relative paths outside current working directory
[git.git] / git-bisect.sh
index 0f7590dfc2294d93b774f2ba4eed84d3e776625f..24712ff304af89317793fa4c54d39f4c579bb345 100755 (executable)
@@ -77,7 +77,7 @@ bisect_start() {
        then
                # Reset to the rev from where we started.
                start_head=$(cat "$GIT_DIR/BISECT_START")
-               git checkout "$start_head" || exit
+               git checkout "$start_head" -- || exit
        else
                # Get rev from where we start.
                case "$head" in
@@ -279,18 +279,6 @@ bisect_auto_next() {
        bisect_next_check && bisect_next || :
 }
 
-eval_and_string_together() {
-       _eval="$1"
-
-       eval "$_eval" | {
-               while read line
-               do
-                       echo "$line &&"
-               done
-               echo ':'
-       }
-}
-
 exit_if_skipped_commits () {
        _tried=$1
        _bad=$2
@@ -309,7 +297,7 @@ bisect_checkout() {
        _msg="$2"
        echo "Bisecting: $_msg"
        mark_expected_rev "$_rev"
-       git checkout -q "$_rev" || exit
+       git checkout -q "$_rev" -- || exit
        git show-branch "$_rev"
 }
 
@@ -429,8 +417,7 @@ bisect_next() {
        test "$?" -eq "1" && return
 
        # Get bisection information
-       eval="git bisect--helper --next-vars" &&
-       eval=$(eval_and_string_together "$eval") &&
+       eval=$(eval "git bisect--helper --next-vars") &&
        eval "$eval" || exit
 
        if [ -z "$bisect_rev" ]; then
@@ -484,7 +471,7 @@ bisect_reset() {
        *)
            usage ;;
        esac
-       git checkout "$branch" && bisect_clean_state
+       git checkout "$branch" -- && bisect_clean_state
 }
 
 bisect_clean_state() {