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)
[ ] Bugfix
[x] Feature
[x] Code style update
[ ] Refactor
[ ] Build-related changes
[ ] Other, please describe:
The PR fulfills these requirements:
[x] All tests are passing?
[ ] New/updated tests are included?
[ ] If any static assets have been updated, has ui/bindata.go been regenerated?
[ ] Are there doc blocks for functions that I updated/created?
If adding a new feature, the PR's description includes:
[x] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)
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!)
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!)