Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-07-25 23:59:24 +0300
committerJunio C Hamano <gitster@pobox.com>2019-07-25 23:59:24 +0300
commit5e9d9787d278331385dbfcf962b32dc4e8d3eb5e (patch)
tree627b8d02082e85236c166a4806fda794626f96cc /t/t3600-rm.sh
parentf3d508f40e3d85fdbe1dafe8f33782766c88dbdd (diff)
parentb2b1f615ce3b9383a32dec7f84488284004224f3 (diff)
Merge branch 'jc/denoise-rm-to-resolve'
"git rm" to resolve a conflicted path leaked an internal message "needs merge" before actually removing the path, which was confusing. This has been corrected. * jc/denoise-rm-to-resolve: rm: resolving by removal is not a warning-worthy event
Diffstat (limited to 't/t3600-rm.sh')
-rwxr-xr-xt/t3600-rm.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t3600-rm.sh b/t/t3600-rm.sh
index 85ae7dc1e4..66282a720e 100755
--- a/t/t3600-rm.sh
+++ b/t/t3600-rm.sh
@@ -252,6 +252,19 @@ test_expect_success 'choking "git rm" should not let it die with cruft' '
test_path_is_missing .git/index.lock
'
+test_expect_success 'Resolving by removal is not a warning-worthy event' '
+ git reset -q --hard &&
+ test_when_finished "rm -f .git/index.lock msg && git reset -q --hard" &&
+ blob=$(echo blob | git hash-object -w --stdin) &&
+ for stage in 1 2 3
+ do
+ echo "100644 $blob $stage blob"
+ done | git update-index --index-info &&
+ git rm blob >msg 2>&1 &&
+ test_i18ngrep ! "needs merge" msg &&
+ test_must_fail git ls-files -s --error-unmatch blob
+'
+
test_expect_success 'rm removes subdirectories recursively' '
mkdir -p dir/subdir/subsubdir &&
echo content >dir/subdir/subsubdir/file &&