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 1
1
` git fmt-diff `
2
2
==============
3
3
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.
5
12
6
13
## Dependencies
7
14
@@ -62,7 +69,7 @@ Configuration follows the rest of Git configuration, example `~/.gitconfig`:
62
69
63
70
[fmt-diff "extern/lib/*.c "]
64
71
ignore = false
65
- formatter = astyle ...
72
+ formatter = astyle --indent=tab
66
73
67
74
[fmt-diff "extern/cpp_lib/*.h "]
68
75
ignore = false
You can’t perform that action at this time.
0 commit comments