From 866fbb54570c74f215208b237ddce48fb79d2cd6 Mon Sep 17 00:00:00 2001 From: Wataru Ashihara Date: Thu, 28 May 2020 00:03:03 +0900 Subject: [PATCH] Fix clang-format-diff usage "--style" is invalid: $ ./checkpatch.sh -r HEAD usage: clang-format-diff [-h] [-i] [-p NUM] [-regex PATTERN] [-iregex PATTERN] [-sort-includes] [-v] [-style STYLE] [-binary BINARY] clang-format-diff: error: unrecognized arguments: --style={ Language:... } --- checkpatch.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/checkpatch.sh b/checkpatch.sh index 6eaa19c4..052121e5 100755 --- a/checkpatch.sh +++ b/checkpatch.sh @@ -164,8 +164,8 @@ function clang_style() local c="${options[cfg]}" echo "{ $(sed -e 's/#.*//' -e '/---/d' -e '/\.\.\./d' "$c" | tr $'\n' ,) }" } -function clang_format() { clang-format --style="$(clang_style)" "$@"; } -function clang_format_diff() { clang-format-diff --style="$(clang_style)" "$@"; } +function clang_format() { clang-format -style="$(clang_style)" "$@"; } +function clang_format_diff() { clang-format-diff -style="$(clang_style)" "$@"; } # for non-bare repo will work function clang_format_git() { git format-patch --stdout "$@" -1 | clang_format_diff; } -- 2.50.1