File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 11` git fmt-diff `
22==============
33
4- Show how lines you changed would look formatted
4+ You inherited a huge codebase with thousands of commits?
5+ And it's an ugly mess? Now you cannot just reformat all those files?
6+ But you want to have future changes adhering to some sane style?
7+ Well, your formatter surely has some Git integration... it doesn't?
8+ In that case, you are in the right place!
9+
10+ ` git fmt-diff ` shows how you could reformat just the lines touched in git commits;
11+ similarly to tools like [ git-clang-format] ( https://clang.llvm.org/docs/ClangFormat.html#git-integration ) , but formatter agnostic.
512
613## Dependencies
714
@@ -62,7 +69,7 @@ Configuration follows the rest of Git configuration, example `~/.gitconfig`:
6269
6370[fmt-diff "extern/lib/*.c "]
6471 ignore = false
65- formatter = astyle ...
72+ formatter = astyle --indent=tab
6673
6774[fmt-diff "extern/cpp_lib/*.h "]
6875 ignore = false
You can’t perform that action at this time.
0 commit comments