The branch main has been updated by arichardson:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=d146f831801f226802e3e1d55bec2cfbea9dc577

commit d146f831801f226802e3e1d55bec2cfbea9dc577
Author:     Alex Richardson <[email protected]>
AuthorDate: 2021-01-07 14:00:32 +0000
Commit:     Alex Richardson <[email protected]>
CommitDate: 2021-01-07 14:00:32 +0000

    prepare-commit-msg: Avoid warning on macOS and shellcheck fixes
    
    The macOS /bin/sh complains about using return outside of functions.
    Replace `return 0` with `exit 0` to fix this. While editing this files
    I've also fixed all the shellcheck warnings that were displayed by my IDE.
    
    Reviewed By:    emaste
    Differential Revision: https://reviews.freebsd.org/D28016
---
 tools/tools/git/hooks/prepare-commit-msg | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/tools/git/hooks/prepare-commit-msg 
b/tools/tools/git/hooks/prepare-commit-msg
index e453b73cc45d..51b92a10724d 100755
--- a/tools/tools/git/hooks/prepare-commit-msg
+++ b/tools/tools/git/hooks/prepare-commit-msg
@@ -13,13 +13,13 @@ commit|message)
        # It appears git invokes this script for interactive rebase but does
        # not remove commented lines, so just exit if we're not called with the
        # default (comment-containing) template.
-       egrep -q '^#' "$1" || return 0
+       grep -E -q '^#' "$1" || exit 0
        ;;
 template)
-       return 0
+       exit 0
        ;;
 merge)
-       return 0
+       exit 0
        ;;
 esac
 
@@ -58,7 +58,7 @@ $(awk '1;/^#$/{exit}' $1)
 #
 # "Pull Request" and "Differential Revision" require the *full* GitHub or
 # Phabricator URL.
-$(awk '/^#$/,EOF' $1)
+$(awk '/^#$/,EOF' "$1")
 EOF
 
-mv $outfile $1
+mv "$outfile" "$1"
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to