From: Junio C Hamano Date: Fri, 20 Apr 2012 22:49:37 +0000 (-0700) Subject: Merge branch 'jc/am-report-3way' X-Git-Tag: v1.7.11-rc0~139 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/bb52e7f600c9732c624ffc27f8321f55c4b4d90b?ds=inline;hp=-c Merge branch 'jc/am-report-3way' When "git am -3" needs to fall back to an application to a synthesized preimage followed by a 3-way merge, the paths that needed such treatment are now reported to the end user, so that the result in them can be eyeballed with extra care. * jc/am-report-3way: am -3: list the paths that needed 3-way fallback --- bb52e7f600c9732c624ffc27f8321f55c4b4d90b diff --combined git-am.sh index 928a35f4e0,e686a17594..f8b7a0cb60 --- a/git-am.sh +++ b/git-am.sh @@@ -24,7 -24,6 +24,7 @@@ ignore-space-change pass it through git ignore-whitespace pass it through git-apply directory= pass it through git-apply exclude= pass it through git-apply +include= pass it through git-apply C= pass it through git-apply p= pass it through git-apply patch-format= format the patch(es) are in @@@ -139,6 -138,12 +139,12 @@@ fall_back_3way () say Using index info to reconstruct a base tree... cmd='GIT_INDEX_FILE="$dotest/patch-merge-tmp-index"' + + if test -z "$GIT_QUIET" + then + eval "$cmd git diff-index --cached --diff-filter=AM --name-status HEAD" + fi + cmd="$cmd git apply --cached $git_apply_opt"' <"$dotest/patch"' if eval "$cmd" then @@@ -413,7 -418,7 +419,7 @@@ d ;; --resolvemsg) shift; resolvemsg=$1 ;; - --whitespace|--directory|--exclude) + --whitespace|--directory|--exclude|--include) git_apply_opt="$git_apply_opt $(sq "$1=$2")"; shift ;; -C|-p) git_apply_opt="$git_apply_opt $(sq "$1$2")"; shift ;;