You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #!/bin/sh
- cd "$(dirname "$0")"
- CLANG_FORMAT="$(find $(echo "$PATH" | tr ':' ' ') -name 'git-clang-format-*' | sort | tail -n1 )"
- if [ -z "$CLANG_FORMAT" ]; then
- echo >&2 'Could not find a clang-format to use. Is the package clang-format installed?'
- exit 1
- fi
- git "$(basename "$CLANG_FORMAT" | cut -d'-' -f 2-)" --diff "$@" | \
- sed "s#+/\*\}\}\}\*/#+ /*}}}*/#" | \
- patch -p1
|