Merge branch 'jc/am-report-3way'
authorJunio C Hamano <gitster@pobox.com>
Fri, 20 Apr 2012 22:49:37 +0000 (15:49 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Apr 2012 22:49:37 +0000 (15:49 -0700)
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

git-am.sh
index 928a35f4e0f7fe7dd29e7084a1a7c11175a9b9b7..f8b7a0cb602d2d2425f68f8c27338cc003b70f6b 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -139,6 +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