diff mbox series

[v4,13/17] read-tree: show progress by default

Message ID 27aa9d22f0bc2a6d02dac5d35d19904845762c27.1571147765.git.gitgitgadget@gmail.com
State New, archived
Headers show
Series New sparse-checkout builtin and "cone" mode | expand

Commit Message

Elijah Newren via GitGitGadget Oct. 15, 2019, 1:56 p.m. UTC
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.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
 builtin/read-tree.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series


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);