daemon: Set SO_REUSEADDR on listening sockets.
[gitweb.git] / git-merge.sh
index 0a158ef779eb8717f27e632e31726f00586979ed..8c0a92c147f6e32a8870f24bd007204bcbc01064 100755 (executable)
@@ -293,7 +293,7 @@ for remote
 do
        echo $remote
 done >"$GIT_DIR/MERGE_HEAD"
-echo $merge_msg >"$GIT_DIR/MERGE_MSG"
+echo "$merge_msg" >"$GIT_DIR/MERGE_MSG"
 
 if test "$merge_was_ok" = t
 then
@@ -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