]> git.ozlabs.org Git - next-scripts/commitdiff
clean up merge_msg
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 30 Sep 2020 06:41:36 +0000 (16:41 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 30 Sep 2020 06:42:30 +0000 (16:42 +1000)
no intended change in semantics

merge_msg

index 38e6e2e6113d3494806c5163e24009a946c097b3..33332d30255c68767d4a536701b1dd96b2250912 100755 (executable)
--- a/merge_msg
+++ b/merge_msg
@@ -1,22 +1,22 @@
 #!/bin/bash
 
-branch=""
-[ "$1" = "-t" ] && {
-        branch="-t $2"
+branch=''
+if [ "X$1" = 'X-t' ]; then
+        branch=( -t "$2" )
         shift 2
-}
+fi
 
 gitk --merge -- "$@" &
-# [ "$#" ] && gvim "$@" 2>/dev/null
 
-printf -v files "  %s\n" "$@"
-conf="a conflict"
-[ "$#" -gt 1 ] &&
-       conf="conflicts"
+printf -v files '  %s\n' "$@"
+conf='a conflict'
+if [ "$#" -gt 1 ]; then
+       conf='conflicts'
+fi
 
-subject="manual merge of the BRANCH tree with the FIXME tree"
+subject='manual merge of the BRANCH tree with the FIXME tree'
 
-$(dirname $0)/message_helper $branch "$subject" <<EOF
+"$(dirname "$0")/message_helper" "${branch[@]}" "$subject" <<EOF
 FIXME: Add owner of second tree to To:
        Add author(s)/SOB of conflicting commits.