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>
This commit is contained in:
@ -301,5 +301,13 @@ then
|
|||||||
"Automatic merge went well; stopped before committing as requested"
|
"Automatic merge went well; stopped before committing as requested"
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
echo '
|
||||||
|
Conflicts:
|
||||||
|
'
|
||||||
|
git ls-files --unmerged |
|
||||||
|
sed -e 's/^[^ ]* / /' |
|
||||||
|
uniq
|
||||||
|
} >>"$GIT_DIR/MERGE_MSG"
|
||||||
die "Automatic merge failed; fix up by hand"
|
die "Automatic merge failed; fix up by hand"
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user