]> git.ozlabs.org Git - next-scripts/blobdiff - check_fixes
check_fixes: minor cleanups
[next-scripts] / check_fixes
index 954ad553d04f023fe950b9471181b50340d33ab8..0bd89e6506a1b2bc8308dceb20f14a0da8800768 100755 (executable)
@@ -15,6 +15,7 @@ Linus_tree="${HOME}/kernels/linus.git"
 split_re='^([[:xdigit:]]+)[[:space:]]+(.*)$'
 nl=$'\n'
 
+# Strip the leading and training spaces from a string
 strip_spaces()
 {
        [[ "$1" =~ ^[[:space:]]*(.*[^[:space:]])[[:space:]]*$ ]]
@@ -24,14 +25,24 @@ strip_spaces()
 for c in $commits; do
 
        commit_log=$(git log -1 --format='%h ("%s")' "$c")
-       commit_msg=$(printf 'In commit\n\n  %s\n\n' "$commit_log")
+       commit_msg="In commit
+
+  $commit_log
+
+"
 
        fixes_lines=$(git log -1 --format='%B' "$c" |
                        grep -i '^[[:space:]]*Fixes:')
 
        while read -r fline; do
                f=$(echo "$fline" | sed 's/^[[:space:]]*Fixes:[[:space:]]*//i')
-               fixes_msg=$(printf 'Fixes tag\n\n  %s\n\n has these problem(s):\n\n' "$fline")
+               fixes_msg="Fixes tag
+
+  $fline
+
+has these problem(s):
+
+"
                sha=
                subject=
                msg=
@@ -62,7 +73,7 @@ for c in $commits; do
                fi
 
                # strip matching quotes at the start and end of the subject
-               # the second characters in the classes are
+               # the unicode characters in the classes are
                # U+201C LEFT DOUBLE QUOTATION MARK
                # U+201D RIGHT DOUBLE QUOTATION MARK
                # U+2018 LEFT SINGLE QUOTATION MARK