]> git.ozlabs.org Git - next-scripts/blob - merge_msg
merge_msg: set and use tools_dir
[next-scripts] / merge_msg
1 #!/bin/bash
2
3 branch=()
4 if [ "X$1" = 'X-b' ]; then
5         branch=( -b "$2" )
6         shift 2
7 fi
8
9 gitk --merge -- "$@" &
10
11 tools_dir=$(dirname "$0")
12
13 printf -v files '  %s\n' "$@"
14 conf='a conflict'
15 if [ "$#" -gt 1 ]; then
16         conf='conflicts'
17 fi
18
19 subject='manual merge of the BRANCH tree with the FIXME tree'
20
21 "$tools_dir/message_helper" "${branch[@]}" "$subject" <<EOF
22 FIXME: Add owner of second tree to To:
23        Add author(s)/SOB of conflicting commits.
24
25 Today's linux-next merge of the BRANCH tree got $conf in:
26
27 $files
28 between commit:
29
30    ("")
31
32 from the FIXME tree and commit:
33
34    ("")
35
36 from the BRANCH tree.
37
38 I fixed it up (see below) and can carry the fix as necessary. This
39 is now fixed as far as linux-next is concerned, but any non trivial
40 conflicts should be mentioned to your upstream maintainer when your tree
41 is submitted for merging.  You may also want to consider cooperating
42 with the maintainer of the conflicting tree to minimise any particularly
43 complex conflicts.
44 EOF
45
46 exit 0