From: Stephen Rothwell Date: Thu, 16 Sep 2021 12:15:21 +0000 (+1000) Subject: make the merge messages more useful X-Git-Url: https://git.ozlabs.org/?p=next-scripts;a=commitdiff_plain;h=b09c5f14b029621ad031d930aa8a91a8bd1b5d51 make the merge messages more useful Put the git URL and branch name of the tree in there. --- diff --git a/common.sh b/common.sh index 7eaa486..d4e3350 100644 --- a/common.sh +++ b/common.sh @@ -54,6 +54,11 @@ get_contacts() awk -F '\t' '/^[^#]/ && $3=="'"$1"'" { print $1; }' $CTRL_FILE } +get_url() +{ + awk -F '\t' '/^[^#]/ && $3=="'"$1"'" { print $4; }' $CTRL_FILE +} + check_unmerged_files() { local tree="$1" diff --git a/do_merge b/do_merge index ec55df9..1668493 100755 --- a/do_merge +++ b/do_merge @@ -88,7 +88,8 @@ for h in $heads; do done 7<"../pre-merge/$tree" fi log Merging "$h" "($hlog)" - if ! execute git merge "$h"; then + printf -v msg "Merge branch '%s' of %s" "${h#*/}" "$(get_url "$tree")" + if ! execute git merge -m "$msg" "$h"; then echo Merge failed 1>&2 echo "$h" >>../merge.debug git diff >>../merge.debug 2>&1