-
Notifications
You must be signed in to change notification settings - Fork 105
Show progress in 'git read-tree' #200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show progress in 'git read-tree' #200
Conversation
When a large repository has many sparse-checkout patterns, the process for updating the skip-worktree bits can take long enough that a user gets confused why nothing is happening. Update the clear_ce_flags() method to write progress. Signed-off-by: Derrick Stolee <[email protected]>
The read-tree builtin has a --verbose option that signals to show progress and other data while updating the index. Update this to be on by default when stderr is a terminal window. This will help tools like 'git sparse-checkout' to automatically benefit from progress indicators when a user runs these commands. Signed-off-by: Derrick Stolee <[email protected]>
builtin/read-tree.c
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should opts.verbose_update be false if --quiet is specified?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears that quiet means something other than "not verbose". This is non-obvious.
The quiet member in struct unpack_trees_options only toggles the output of error messages. This is different than the verbose_update member which toggles the existing progress indicators during the checkout.
Today, if you say git read-tree --verbose --quiet -mu HEAD, then you will still get progress indicators during the "Checking out files" step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the details here, I couldn't quite figure out what --quiet was controlling.
jeffhostetler
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine as is. However, it would be better if we could use the ce offset trick and give this change a lighter footprint.
Signed-off-by: Derrick Stolee <[email protected]>
0a883bc to
e98704e
Compare
See microsoft/git#200 for details. Resolves microsoft/git#181. This will give users more ideas of how long a command will take when modifying the sparse-checkout definition. In particular, we will notice if clear_ce_flags() is suddenly slow.
When updating a sparse-checkout, it can be confusing what is taking so much time. Usually, it is the
git read-tree -mu HEADcall.This PR adds progress to the 'git read-tree' builtin by
Here is an example of output for the Linux kernel repo:
Resolves #181.