Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clang-format-diff usage #1029

Merged
merged 1 commit into from
May 27, 2020
Merged

Conversation

wataash
Copy link
Contributor

@wataash wataash commented May 27, 2020

"--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:... }

References:

"--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:... }
@@ -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)" "$@"; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but clang-format has --style, although works both, ok

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry, I overlooked...
Please feel free to revert this line.
Thanks for reviewing.

azat added a commit that referenced this pull request May 27, 2020
azat added a commit that referenced this pull request May 27, 2020
- strip 1 path component
- it does not accept file name anymore, only stdin

Refs: #1029
@azat azat merged commit 866fbb5 into libevent:master May 27, 2020
@wataash wataash deleted the clang-format-diff-format branch May 28, 2020 00:04
azat added a commit to azat/libevent that referenced this pull request Jun 28, 2020
Refs: libevent#1029
(cherry picked from commit 8209a62)
azat added a commit to azat/libevent that referenced this pull request Jun 28, 2020
- strip 1 path component
- it does not accept file name anymore, only stdin

Refs: libevent#1029
(cherry picked from commit 89d313b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants