feat: support .gitignore files #19

Merged
brianmcgee merged 3 commits from feat/support-gigignore into main 2024-01-11 20:52:23 +00:00

3 Commits

Author SHA1 Message Date
bcc4902ed8
feat: refine walking into a separate package
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-01-10 15:04:39 +00:00
fcb8aa6312
chore: minor cleanup
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-01-10 13:38:30 +00:00
9051aa6d0f
feat: support traversing the filesystem using git
Introduces a `--walk` flag which can be used to tell `treefmt` how to traverse the directory specified by `--tree-root`.

By default, it will attempt to use `git ls-files`. If this fails, it falls back to using the filesystem.

You can explicitly traverse the filesystem instead of using git by providing `--walk filesystem`.

Close #1

Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-01-10 13:35:18 +00:00