summaryrefslogtreecommitdiff
path: root/t/t7201-co.sh
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-03-22 09:31:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-03-24 12:35:34 (GMT)
commit3e41485d856dab4589f25759a367091e40a95cb3 (patch)
tree6837342dbb44ed88299e6596336a7b090cffed2f /t/t7201-co.sh
parentb165fac8c1970e9cc9e5a0715a2f06b3530b2570 (diff)
downloadgit-3e41485d856dab4589f25759a367091e40a95cb3.zip
git-3e41485d856dab4589f25759a367091e40a95cb3.tar.gz
git-3e41485d856dab4589f25759a367091e40a95cb3.tar.bz2
read-tree: add --quiet
read-tree is basically the front end of unpack-trees code and shoud expose all of its functionality (unless it's designed for internal use). This "opts.quiet" (formerly "opts.gently") was added for builtin/checkout.c but there is no reason why other read-tree users won't find this useful. The test that is updated to run 'read-tree --quiet' was added because unpack-trees was accidentally not being quiet [1] in 6a143aa2b2 (checkout -m: attempt merge when deletion of path was staged - 2014-08-12). Because checkout is the only "opts.quiet" user, there was no other way to test quiet behavior. But we can now test it directly. 6a143aa2b2 was manually reverted to verify that read-tree --quiet works correctly (i.e. test_must_be_empty fails). [1] the commit message there say "errors out instead of performing a merge" but I'm pretty sure the "performing a merge" happens anyway even before that commit. That line should say "errors out _in addition to_ performing a merge" Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7201-co.sh')
-rwxr-xr-xt/t7201-co.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/t/t7201-co.sh b/t/t7201-co.sh
index 72b9b37..f165582 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 &&