git: get info from a 'bare' repo instead #487
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For git repositories you basically always pay the storage cost twice:
once for the tree in .git, once for the actual files being checked out.
Additionally, the tree in .git is compressed, so in many cases it can be
smaller than the actual files being checked out.
This commit updates Hound to optionally process git files from the
actual git files instead of the checked out tree.
For me, this saves a significant amount of disk space. Why does it
matter? Because I run hound on a laptop instead of a datacenter, and
space is limited. It does cost a few more CPU cycles, but that's fine by
me.
What kind of change does this PR introduce? (check at least one)
The PR fulfills these requirements:
If adding a new feature, the PR's description includes:
Other information:
I'm creating this as a draft PR because it's obviously not ready to be merged (missing tests), and I first want to know if the upstream project would even be interested in this (the go.mod diff is probably already a blocker...). If yes I'll happily expand on the PR a bit more, if not I'm also fine with that. This was quickly hacked up as a POC (and to stop my laptop from running out of disk space!)