llvm-project
fe0143b1 - [git-clang-format] Don't format the line preceding a deletion (#215946)

Commit
9 days ago
[git-clang-format] Don't format the line preceding a deletion (#215946) `git diff -U0` renders a pure deletion as `@@ -3,3 +2,0 @@`: no new lines, anchored at the preceding line. extract_lines coerces that zero count to one, so clang-format reformats a line the deletion never touched. Skip such hunks, matching clang-format-diff.py. start_line is 0 only for deletions at the start of a file, so that check goes away as well. Aided by Claude Opus 5
Author
Parents
Loading