mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
checkpatch.sh: fix clang-format-diff usage
- strip 1 path component - it does not accept file name anymore, only stdin Refs: #1029
This commit is contained in:
parent
8209a623ad
commit
89d313b14d
@ -165,7 +165,7 @@ function clang_style()
|
||||
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_diff() { cat "$@" | clang-format-diff -p1 -style="$(clang_style)"; }
|
||||
# for non-bare repo will work
|
||||
function clang_format_git()
|
||||
{ git format-patch --stdout "$@" -1 | clang_format_diff; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user