{"thread":{"id":"30092","subject":"[PATCH] am -3: list the paths that needed 3-way fallback","startedAt":"2012-03-29T04:04:12Z","lastAt":"2012-03-29T04:04:12Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"188031","messageId":"7v1uocrr2b.fsf@alter.siamese.dyndns.org","threadId":"30092","inReplyTo":null,"subject":"[PATCH] am -3: list the paths that needed 3-way fallback","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-03-29T04:04:12Z","receivedAt":"2012-03-29T04:04:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"When applying a patch that was based on an older release with \"am -3\", I\noften wonder changes to which files need to be reviewed with extra care to\nspot mismerges, but there is no good indication.\n\nThe paths that needed 3-way fallback can easily be obtained by comparing\nthe synthesized (partial) base tree and the current HEAD and noticing only\nadditions and modifications (removals only show the sparseness of the fake\nancestor tree, which is not useful information at all).  List them in the\nusual --name-status format.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n git-am.sh |    6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/git-am.sh b/git-am.sh\nindex 4da0dda..e686a17 100755\n--- a/git-am.sh\n+++ b/git-am.sh\n@@ -138,6 +138,12 @@ fall_back_3way () {\n     say Using index info to reconstruct a base tree...\n \n     cmd='GIT_INDEX_FILE=\"$dotest/patch-merge-tmp-index\"'\n+\n+    if test -z \"$GIT_QUIET\"\n+    then\n+\teval \"$cmd git diff-index --cached --diff-filter=AM --name-status HEAD\"\n+    fi\n+\n     cmd=\"$cmd git apply --cached $git_apply_opt\"' <\"$dotest/patch\"'\n     if eval \"$cmd\"\n     then\n-- \n1.7.10.rc2.76.gd2b7f\n"}]}