]> git.ozlabs.org Git - next-scripts/commitdiff
make the merge messages more useful
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 16 Sep 2021 12:15:21 +0000 (22:15 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 16 Sep 2021 12:15:21 +0000 (22:15 +1000)
Put the git URL and branch name of the tree in there.

common.sh
do_merge

index 7eaa48620e0214885854a542a612c7e113c5f317..d4e3350ab13d5907651e6624d6d47a1e82817f67 100644 (file)
--- 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"
index ec55df978936098261efb35508a21f6bd13bb067..1668493d51fdd9c366ec8340276ceba022552b09 100755 (executable)
--- 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