diff options
author | Dr. David von Oheimb <dev@ddvo.net> | 2024-10-10 22:13:42 +0200 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2024-10-26 18:52:57 +0200 |
commit | 380ea5974cc5fec47dd5ee6280e34a1b3d0313c5 (patch) | |
tree | 6fc574d3e723ffb258679a19a14e378ad797f7f2 /util/check-format-commit.sh | |
parent | Dependabot update (diff) | |
download | openssl-380ea5974cc5fec47dd5ee6280e34a1b3d0313c5.tar.xz openssl-380ea5974cc5fec47dd5ee6280e34a1b3d0313c5.zip |
check-format-commit.sh: make awk patterns more robust for MacOS and certain flavors of Linux
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/25666)
Diffstat (limited to '')
-rwxr-xr-x | util/check-format-commit.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/util/check-format-commit.sh b/util/check-format-commit.sh index cf958923fa..d80fb19a04 100755 --- a/util/check-format-commit.sh +++ b/util/check-format-commit.sh @@ -72,14 +72,14 @@ fi touch $TEMPDIR/ranges.txt git diff -U0 $COMMIT_RANGE | awk ' BEGIN {myfile=""} - /+{3}/ { - gsub(/b\//,"",$2); + /^\+\+\+/ { + sub(/^b./,"",$2); myfile=$2 } - /@@/ { - gsub(/+/,"",$3); + /^@@/ { + sub(/^\+/,"",$3); printf myfile " " $3 "\n" - }' >> $TEMPDIR/ranges.txt || true + }' > $TEMPDIR/ranges.txt || true # filter in anything that matches on a filter regex for i in ${FILE_ALLOWLIST[@]} |