Skip to content

Commit 0430e36

Browse files
committed
Test with git diff HEAD^1
1 parent a8a27a7 commit 0430e36

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.circleci/config.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,13 @@ jobs:
4545
git fetch --no-tags --no-recurse-submodules target $BASE_BRANCH
4646
4747
echo "Checking clang-format results"
48-
git diff -U0 "$(git merge-base HEAD target/$BASE_BRANCH)" *.c *.cc *.cpp *.h *.hpp *.i *.ic *.ih | clang-format-diff-$COMPILER_VERSION -style=file -p1 >_GIT_DIFF
48+
git diff HEAD^1 --name-only
49+
git diff -U0 --no-color HEAD^1 *.c *.cc *.cpp *.h *.hpp *.i *.ic *.ih | clang-format-diff-$COMPILER_VERSION -style=file -p1 >_GIT_DIFF
4950
if [ ! -s _GIT_DIFF ]; then
50-
echo The last git commit is clang-formatted;
51+
echo The last git commit is clang-formatted;
5152
else
52-
cat _GIT_DIFF;
53-
# false;
53+
cat _GIT_DIFF;
54+
#false;
5455
fi
5556
5657
echo "Checking clang-tidy static code analysis results"

0 commit comments

Comments
 (0)