@matheusbsbs / matheus-bagliano / commits / 6b94f1e404
Fork 0

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>

Junio C Hamano committed Jan 27, 2006 at 23:05 UTC 6b94f1e404afc552e5139c4357331843f5be61ad
1 file changed +8
git-merge.sh
+8
@@ -301,5 +301,13 @@ then
301 "Automatic merge went well; stopped before committing as requested"
302 exit 0
303 else
304 + {
305 + echo '
306 +Conflicts:
307 +'
308 + git ls-files --unmerged |
309 + sed -e 's/^[^ ]* / /' |
310 + uniq
311 + } >>"$GIT_DIR/MERGE_MSG"
312 die "Automatic merge failed; fix up by hand"
313 fi