From: Junio C Hamano Date: Sat, 28 Jan 2006 07:05:05 +0000 (-0800) Subject: merge: seed the commit message with list of conflicted files. X-Git-Tag: v1.2.0~101 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=6b94f1e404afc552e5139c4357331843f5be61ad;p=git.git merge: seed the commit message with list of conflicted files. The files with conflicts need to be hand resolved, and it is a good discipline for the committer to explain which branch was taken and why. Pre-fill the merge message template with the list of conflicted paths to encourage it. This is from Linus. Signed-off-by: Junio C Hamano --- diff --git a/git-merge.sh b/git-merge.sh index 0a158ef7..92e5a65c 100755 --- a/git-merge.sh +++ b/git-merge.sh @@ -301,5 +301,13 @@ then "Automatic merge went well; stopped before committing as requested" exit 0 else + { + echo ' +Conflicts: +' + git ls-files --unmerged | + sed -e 's/^[^ ]* / /' | + uniq + } >>"$GIT_DIR/MERGE_MSG" die "Automatic merge failed; fix up by hand" fi