From b09c5f14b029621ad031d930aa8a91a8bd1b5d51 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Thu, 16 Sep 2021 22:15:21 +1000 Subject: [PATCH] make the merge messages more useful Put the git URL and branch name of the tree in there. --- common.sh | 5 +++++ do_merge | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) 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 -- 2.39.2