git diff -U1 |
perl -ne '
if (m|^\+\+\+ b/(.*)|) { $name = $1 }
if (m|^@@.*\+(\d+),(\d+)|) { $from = $1; $to = $from + $2; print "clang-format -lines=$from:$to -style=file -i $name\n" }
' |
sh
Created
January 3, 2018 12:05
-
-
Save AtnNn/10d17408516ae408788484418740f18b to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment