Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-03-28 20:55:21 +0400
committerJunio C Hamano <gitster@pobox.com>2012-03-28 21:20:33 +0400
commit5d86861c925f15676a14b54062725eb11a85ffbc (patch)
tree470e0edf80bdb355961d95ff37e4c333a5cdb701 /git-am.sh
parent6c15a1c63634005a0f8fb15696e154cc54b0a359 (diff)
am -3: list the paths that needed 3-way fallback
When applying a patch that was based on an older release with "am -3", I often wonder changes to which files need to be reviewed with extra care to spot mismerges, but there is no good indication. The paths that needed 3-way fallback can easily be obtained by comparing the synthesized (partial) base tree and the current HEAD and noticing only additions and modifications (removals only show the sparseness of the fake ancestor tree, which is not useful information at all). List them in the usual --name-status format. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-am.sh')
-rwxr-xr-xgit-am.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/git-am.sh b/git-am.sh
index 4da0ddafc4..e686a17594 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -138,6 +138,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