Add hydration percentages to git status hook #1883
Merged
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 a few releases,
git statuswould output a message like "You are in a partially-hydrated checkout with 1% of tracked files present."However, this implementation only measured files that had been modified; files that were hydrated but unmodified were not included, so the change was reverted.
This change adds a line to the start of
git statussimilar to "1% of files and 1% of folders hydrated. Run 'gvfs health' for details."I decided to show separate %s for files and folders because I think there is a meaningful difference between "0% files and 100% folders" and "10% files and 10% folders", but if combined both could display as "11% total hydration" (with ~1:10 ratio of folders to files).
** Changes **
gvfs healthverb,--status, to display the new output line.gvfs health --statuson pre-command hook forgit statusexcept when called with --serialize.git ls-tree -r -d HEADgvfs health [--status]will attempt to read the modified file list directly instead of getting it from the current mount process.