Merge branch 'js/maint-am-skip-performance-regression' into maint
authorJunio C Hamano <gitster@pobox.com>
Thu, 17 Sep 2015 19:03:02 +0000 (12:03 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 17 Sep 2015 19:03:02 +0000 (12:03 -0700)
* js/maint-am-skip-performance-regression:
am --skip/--abort: merge HEAD/ORIG_HEAD tree into index

1  2 
git-am.sh
diff --combined git-am.sh
index 3af351ffaaf32af6431e7a0dd53ea619507c55bf,4ab1f21505121a8f89735cf21b1681be2a57767d..455ce4fca0c2fff43f097673a023931b04485d2e
+++ b/git-am.sh
@@@ -381,7 -381,6 +381,7 @@@ committer_date_is_author_date
  ignore_date=
  allow_rerere_autoupdate=
  gpg_sign_opt=
 +threeway=
  
  if test "$(git config --bool --get am.messageid)" = true
  then
@@@ -510,7 -509,7 +510,7 @@@ the
                git read-tree --reset -u $head_tree $head_tree &&
                index_tree=$(git write-tree) &&
                git read-tree -m -u $index_tree $head_tree
-               git read-tree $head_tree
+               git read-tree -m $head_tree
                ;;
        ,t)
                if test -f "$dotest/rebasing"
@@@ -843,10 -842,10 +843,10 @@@ To restore the original branch and sto
                continue
        fi
  
 -      if test -x "$GIT_DIR"/hooks/applypatch-msg
 +      hook="$(git rev-parse --git-path hooks/applypatch-msg)"
 +      if test -x "$hook"
        then
 -              "$GIT_DIR"/hooks/applypatch-msg "$dotest/final-commit" ||
 -              stop_here $this
 +              "$hook" "$dotest/final-commit" || stop_here $this
        fi
  
        if test -f "$dotest/final-commit"
@@@ -920,10 -919,9 +920,10 @@@ did you forget to use 'git add'?
                stop_here_user_resolve $this
        fi
  
 -      if test -x "$GIT_DIR"/hooks/pre-applypatch
 +      hook="$(git rev-parse --git-path hooks/pre-applypatch)"
 +      if test -x "$hook"
        then
 -              "$GIT_DIR"/hooks/pre-applypatch || stop_here $this
 +              "$hook" || stop_here $this
        fi
  
        tree=$(git write-tree) &&
                echo "$(cat "$dotest/original-commit") $commit" >> "$dotest/rewritten"
        fi
  
 -      if test -x "$GIT_DIR"/hooks/post-applypatch
 -      then
 -              "$GIT_DIR"/hooks/post-applypatch
 -      fi
 +      hook="$(git rev-parse --git-path hooks/post-applypatch)"
 +      test -x "$hook" && "$hook"
  
        go_next
  done
  
  if test -s "$dotest"/rewritten; then
      git notes copy --for-rewrite=rebase < "$dotest"/rewritten
 -    if test -x "$GIT_DIR"/hooks/post-rewrite; then
 -      "$GIT_DIR"/hooks/post-rewrite rebase < "$dotest"/rewritten
 +    hook="$(git rev-parse --git-path hooks/post-rewrite)"
 +    if test -x "$hook"; then
 +      "$hook" rebase < "$dotest"/rewritten
      fi
  fi