diff options
-rw-r--r-- | Documentation/git-read-tree.txt | 4 | ||||
-rw-r--r-- | builtin/read-tree.c | 1 | ||||
-rwxr-xr-x | t/t7201-co.sh | 3 |
3 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/git-read-tree.txt b/Documentation/git-read-tree.txt index 5c70bc2878..1e81f9c4e6 100644 --- a/Documentation/git-read-tree.txt +++ b/Documentation/git-read-tree.txt @@ -128,6 +128,10 @@ OPTIONS Instead of reading tree object(s) into the index, just empty it. +-q:: +--quiet:: + Quiet, suppress feedback messages. + <tree-ish#>:: The id of the tree object(s) to be read/merged. diff --git a/builtin/read-tree.c b/builtin/read-tree.c index 9083dcfa28..5c9c082595 100644 --- a/builtin/read-tree.c +++ b/builtin/read-tree.c @@ -154,6 +154,7 @@ int cmd_read_tree(int argc, const char **argv, const char *unused_prefix) { OPTION_CALLBACK, 0, "recurse-submodules", NULL, "checkout", "control recursive updating of submodules", PARSE_OPT_OPTARG, option_parse_recurse_submodules_worktree_updater }, + OPT__QUIET(&opts.quiet, N_("suppress feedback messages")), OPT_END() }; diff --git a/t/t7201-co.sh b/t/t7201-co.sh index 72b9b375ba..f165582019 100755 --- a/t/t7201-co.sh +++ b/t/t7201-co.sh @@ -223,6 +223,9 @@ test_expect_success 'switch to another branch while carrying a deletion' ' test_must_fail git checkout simple 2>errs && test_i18ngrep overwritten errs && + test_must_fail git read-tree --quiet -m -u HEAD simple 2>errs && + test_must_be_empty errs && + git checkout --merge simple 2>errs && test_i18ngrep ! overwritten errs && git ls-files -u && |