X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=merge_msg;fp=merge_msg;h=011b6994279026e1db099c5685b2ab69739b494e;hb=e1b1448c210ddb68efc365fce049640243cd2bbd;hp=7ab7c176e23bcc0ae3162d94f81e8fc250da89d6;hpb=aded3d9f8e83f652dddd6b5a1b0ffa206ccabfb1;p=next-scripts diff --git a/merge_msg b/merge_msg index 7ab7c17..011b699 100755 --- a/merge_msg +++ b/merge_msg @@ -10,6 +10,20 @@ gitk --merge -- "$@" & tools_dir=$(dirname "$0") +hc=() +cc=() +cformat='%(trailers:only=no,valueonly,unfold,key=signed-off-by)%aN <%aE>%n%cN <%cE>' + +read -r -a head_commits -p 'HEAD commit(s): ' +for c in "${head_commits[@]}"; do + if ! git rev-parse --verify "$c" >/dev/null; then + printf 'Unknown commit %s\n' "$c" + exit 1 + fi + hc+=( "$(git log -1 --format='%h ("%s")' "$c")" ) + readarray -t -O "${#cc[@]}" cc < <(git log -1 --format="$cformat" "$c" | sort -u) +done + printf -v files ' %s\n' "$@" conf='a conflict' if [ "$#" -gt 1 ]; then @@ -18,7 +32,7 @@ fi subject='manual merge of the BRANCH tree with the FIXME tree' -"$tools_dir/message_helper" "${branch[@]}" "$subject" <