]> git.ozlabs.org Git - next-scripts/blobdiff - merge_msg
make_tree_file: use the official name for kup.kernel.org
[next-scripts] / merge_msg
index 547fbb92821393cf46fa9a7b7e61d13212091da9..626cf943460a1bd7a8b36a28217f53596cdfeeab 100755 (executable)
--- a/merge_msg
+++ b/merge_msg
@@ -1,26 +1,29 @@
 #!/bin/bash
 
-log=../merge.log
-[ -f merge.log ] && log=merge.log
-control=../real_control
-[ -f real_control ] && control=real_control
-
-branch=$(grep '^Merging ' $log | tail -1 | sed 's/^Merging //' | sed 's/ .*$//')
-branch=${branch#quilt/}
-branch=${branch%%/*}
-
-contact=$(awk -F '     ' '$3=="'"$branch"'" { print $1; }' $control)
-greeting=${contact%% *}
-greeting=${greeting#\"}
-[ "${contact%,*}" = "${contact}" ] || greeting="all"
+branch=""
+[ "$1" = "-t" ] && {
+        branch="-t $2"
+        shift 2
+}
 
 file="$*"
 
 gitk --merge -- $file &
 [ "$file" ] && gvim $file
 
-sylpheed --compose "mailto:$contact?Cc=linux-next@vger.kernel.org,%20linux-kernel@vger.kernel.org&Subject=linux-next: manual merge of the $branch tree with the  tree&Body=Hi $greeting,%0A\
+conf="a conflict"
+[ "$#" -gt 1 ] && {
+       file=${file// /, }
+       file=$(echo $file | sed 's/,\([^,]*\)$/ and\1/')
+       conf="conflicts"
+}
+
+subject="manual merge of the BRANCH tree with the  tree"
+body="Today's linux-next merge of the BRANCH tree got $conf in $file between commit  (%22%22) from the  tree and commit  (%22%22) from the BRANCH tree.%0A\
 %0A\
-Today's linux-next merge of the $branch tree got a conflict in $file between commit  (%22%22) from the  tree and commit  (%22%22) from the $branch tree."
+I fixed it up (see below) and can carry the fix as necessary (no action%0A\
+is required)."
+
+$(dirname $0)/message_helper $branch "$subject" "$body"
 
 exit 0