Skip to content

Commit

Permalink
Fix git-clang-format arg parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
areusch committed Jun 25, 2020
1 parent 5d0c556 commit 64abc40
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/lint/git-clang-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ set -e
set -u
set -o pipefail

if [[ "$1" == "-i" ]]; then
INPLACE_FORMAT=1
shift 1
else
INPLACE_FORMAT=0
fi

if [[ "$#" -lt 1 ]]; then
echo "Usage: tests/lint/git-clang-format.sh [-i] <commit>"
echo ""
Expand All @@ -30,13 +37,6 @@ if [[ "$#" -lt 1 ]]; then
exit 1
fi

if [[ "$1" == "-i" ]]; then
INPLACE_FORMAT=1
shift 1
else
INPLACE_FORMAT=0
fi

cleanup()
{
rm -rf /tmp/$$.clang-format.txt
Expand Down

0 comments on commit 64abc40

Please sign in to comment.