Skip to content

Commit

Permalink
merge: seed the commit message with list of conflicted files.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano committed Jan 28, 2006
1 parent 767e130 commit 6b94f1e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions git-merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6b94f1e

Please sign in to comment.