Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorenar committed Oct 30, 2023
1 parent 873a8f2 commit 63c322d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
`git fmt-diff`
==============

Show how lines you changed would look formatted
You inherited a huge codebase with thousands of commits?
And it's an ugly mess? Now you cannot just reformat all those files?
But you want to have future changes adhering to some sane style?
Well, your formatter surely has some Git integration... it doesn't?
In that case, you are in the right place!

`git fmt-diff` shows how you could reformat just the lines touched in git commits;
similarly to tools like [git-clang-format](https://clang.llvm.org/docs/ClangFormat.html#git-integration), but formatter agnostic.

## Dependencies

Expand Down Expand Up @@ -62,7 +69,7 @@ Configuration follows the rest of Git configuration, example `~/.gitconfig`:

[fmt-diff "extern/lib/*.c"]
ignore = false
formatter = astyle ...
formatter = astyle --indent=tab

[fmt-diff "extern/cpp_lib/*.h"]
ignore = false
Expand Down

0 comments on commit 63c322d

Please sign in to comment.