4 if [ "X$1" = 'X-b' ]; then
11 tools_dir=$(dirname "$0")
15 cformat='%(trailers:only=no,valueonly,unfold,key=signed-off-by)%aN <%aE>%n%cN <%cE>'
17 read -r -a head_commits -p 'HEAD commit(s): '
18 for c in "${head_commits[@]}"; do
19 if ! git rev-parse --verify "$c" >/dev/null; then
20 printf 'Unknown commit %s\n' "$c"
23 hc+=( "$(git log -1 --format='%h ("%s")' "$c")" )
24 readarray -t -O "${#cc[@]}" cc < <(git log -1 --format="$cformat" "$c" | sort -u)
27 if [ "${#hc[@]}" -gt 1 ]; then
31 read -r -a head_branches -p 'HEAD branch(es): '
33 hb=( "${head_branches[@]/%/,}" )
35 if [ "${#hb[@]}" -gt 2 ]; then
36 hb[-2]=${hb[-2]/%,/ and}
39 if [ "${#hb[@]}" -gt 1 ]; then
43 printf -v subject 'manual merge of the BRANCH tree with the %s tree%s' \
46 printf -v files ' %s\n' "$@"
48 if [ "$#" -gt 1 ]; then
52 "$tools_dir/message_helper" "${branch[@]}" "$subject" "${cc[@]}" <<EOF
53 FIXME: Add owner of second tree to To:
54 Add author(s)/SOB of conflicting commits.
56 Today's linux-next merge of the BRANCH tree got $conf in:
61 $(printf ' %s\n' "${hc[@]}")
63 from the ${hb[*]} tree$hbs and commit:
69 I fixed it up (see below) and can carry the fix as necessary. This
70 is now fixed as far as linux-next is concerned, but any non trivial
71 conflicts should be mentioned to your upstream maintainer when your tree
72 is submitted for merging. You may also want to consider cooperating
73 with the maintainer of the conflicting tree to minimise any particularly