Skip to content

Commit

Permalink
Update 2024-04-25-code-formatting-with-git-filter-branch.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cr7pt0gr4ph7 authored Apr 25, 2024
1 parent 878afbf commit add2b86
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions _posts/2024-04-25-code-formatting-with-git-filter-branch.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,12 @@ Example output (truncated):

## Bonus: Custom code formatting tools

Your custom tool should accept a list of files to format either via stdin, or as command line arguments.
It should format the specified files in-place. Your `--tree-filter` should then look something like this.
You can still employ `git filter-branch` even if you do not use the `pre-commit` tool.
The only requirement is that you have a custom that accepts a list of files to format
either via stdin, or as command line arguments, and writes the formatted files back
to their original locations.

Your `--tree-filter` should then look something like this, either inline or wrapped into a shell script file:

```bash
# Pass the list of changed files via stdin
Expand Down

0 comments on commit add2b86

Please sign in to comment.