Skip to content

fix(pre-commit): Fix treefmt being run concurrently on large repos#45

Merged
tlater-famedly merged 1 commit into
mainfrom
tlater/fix-treefmt-prek
Jul 21, 2026
Merged

fix(pre-commit): Fix treefmt being run concurrently on large repos#45
tlater-famedly merged 1 commit into
mainfrom
tlater/fix-treefmt-prek

Conversation

@tlater-famedly

Copy link
Copy Markdown
Contributor

We've configured prek to pass filenames to treefmt so that treefmt can be limited only to changed files.

When using prek -a in a large repository, however, there will be too many files for the OS' command limit, so prek instead batches the files across multiple invocations.

treefmt doesn't seem to like running concurrently due to its cache, however, resulting in errors.

We've configured `prek` to pass filenames to `treefmt` so that
`treefmt` can be limited only to changed files.

When using `prek -a` in a large repository, however, there will be too
many files for the OS' command limit, so `prek` instead batches the
files across multiple invocations.

`treefmt` doesn't seem to like running concurrently due to its cache,
however, resulting in errors.
@tlater-famedly
tlater-famedly force-pushed the tlater/fix-treefmt-prek branch from 483acc5 to 72fba97 Compare July 21, 2026 10:06

@RasmusRendal RasmusRendal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works on my machine!

@tlater-famedly
tlater-famedly merged commit 72fba97 into main Jul 21, 2026
2 checks passed
@tlater-famedly
tlater-famedly deleted the tlater/fix-treefmt-prek branch July 21, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants