Skip to content

Commit 95dc7df

Browse files
authored
Merge pull request #84059 from gottesmm/pr-01c0347486acb63c846ab6808b78c39ce86b404a
[git-clang-format-all] Apply fixup commits one at a time.
2 parents e24ef9d + 62af694 commit 95dc7df

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

utils/git-clang-format-all.zsh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,12 @@ for commit in "${COMMITS[@]}"; do
6565
echo "Processing commit: $commit ($(git log --oneline -1 $commit))"
6666

6767
if ! git-clang-format "${commit}^" >/dev/null ; then
68-
echo " Committed fixup commit with formatting changes"
68+
echo " Formatting required"
6969
git commit --quiet -a --fixup "${commit}"
70+
git -c sequence.editor=: rebase -i --autosquash --quiet "${commit}^"
7071
else
7172
echo " No formatting changes needed"
7273
fi
7374
done
7475

75-
echo "Squashing fixup commits using git rebase autosquash"
76-
git -c sequence.editor=: rebase -i --autosquash --quiet "${TARGET_HASH}^"
77-
7876
echo "All commits formatted successfully"

0 commit comments

Comments
 (0)