Message ID | 3a677f32b6b914fcc800b619fd082da25c275422.1570478905.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | New sparse-checkout builtin and "cone" mode | expand |
On Mon, Oct 7, 2019 at 1:08 PM Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com> wrote: > > From: Derrick Stolee <dstolee@microsoft.com> > > 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. This change seems fine, but in patch 2 you said: > The use of running another process for 'git read-tree' is sub- > optimal. This will be removed in a later change. leaving me slightly confused about the goal/plan.
On 10/12/2019 6:16 PM, Elijah Newren wrote: > On Mon, Oct 7, 2019 at 1:08 PM Derrick Stolee via GitGitGadget > <gitgitgadget@gmail.com> wrote: >> >> From: Derrick Stolee <dstolee@microsoft.com> >> >> 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. > > This change seems fine, but in patch 2 you said: > >> The use of running another process for 'git read-tree' is sub- >> optimal. This will be removed in a later change. > > leaving me slightly confused about the goal/plan. True, this is not necessary for the whole series. I created this patch as a way to show progress in our microsoft/git fork [1], then removed the read-tree call in a later change [2]. When preparing v3, I took all of the changes together. I thought this was valuable on its own, for those users who are using the old mechanisms for sparse-checkout updates. Thanks, -Stolee [1] https://github.com/microsoft/git/pull/200 [2] https://github.com/microsoft/git/pull/204
diff --git a/builtin/read-tree.c b/builtin/read-tree.c index ca5e655d2f..69963d83dc 100644 --- a/builtin/read-tree.c +++ b/builtin/read-tree.c @@ -162,6 +162,7 @@ int cmd_read_tree(int argc, const char **argv, const char *cmd_prefix) opts.head_idx = -1; opts.src_index = &the_index; opts.dst_index = &the_index; + opts.verbose_update = isatty(2); git_config(git_read_tree_config, NULL);