summaryrefslogtreecommitdiff
path: root/git-merge.sh
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-01-28 07:05:05 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-01-28 07:05:05 (GMT)
commit6b94f1e404afc552e5139c4357331843f5be61ad (patch)
tree78e89a35f8704f894b4c6c991a3228638bff4462 /git-merge.sh
parent767e130915015f897fb87b939843b4882212574b (diff)
downloadgit-6b94f1e404afc552e5139c4357331843f5be61ad.zip
git-6b94f1e404afc552e5139c4357331843f5be61ad.tar.gz
git-6b94f1e404afc552e5139c4357331843f5be61ad.tar.bz2
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 <junkio@cox.net>
Diffstat (limited to 'git-merge.sh')
-rwxr-xr-xgit-merge.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/git-merge.sh b/git-merge.sh
index 0a158ef..92e5a65 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