From b778e8c06d0abb188598a7e5365b0d9d6a546452 Mon Sep 17 00:00:00 2001 From: Juliana Fajardini Date: Wed, 16 Sep 2026 15:35:46 -0300 Subject: [PATCH] clang-format: fix commit-filter off-by-one The filter range excluded $first_commit itself, so the first commit on the branch was never rewritten and single-commit branches failed. Ticket: #9097 --- scripts/clang-format.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/clang-format.sh b/scripts/clang-format.sh index f1542710fd..417fbe3ff6 100755 --- a/scripts/clang-format.sh +++ b/scripts/clang-format.sh @@ -578,7 +578,7 @@ function ReformatCommitsOnBranch { # Tolerate exit code 1, it means the tree filter reformatted files. git filter-branch --force --tree-filter \ "$GIT_CLANG_FORMAT --extensions c,h $first_commit^ || [ \$? -le 1 ]" \ - -- $first_commit..HEAD + -- $first_commit^..HEAD if [ $? -ne 0 ]; then Die "Cannot rewrite branch. git filter-branch failed" fi