From df0b99f00458dd0d442b17d78dd4c171a89f7bb2 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Mon, 20 Sep 2010 02:28:36 -0600 Subject: [PATCH] t6032: Add a test checking for excessive output from merge Previous D/F fixes I submitted (5a2580d and ae74548) had caused merge to become excessively spammy, which was fixed in 96ecac6 (merge-recursive: Avoid excessive output for and reprocessing of renames 2010-08-20). Add a new test to avoid repeating that mistake with my several upcoming changes. Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- t/t6032-merge-large-rename.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/t/t6032-merge-large-rename.sh b/t/t6032-merge-large-rename.sh index eac5ebac2..fdb6c2537 100755 --- a/t/t6032-merge-large-rename.sh +++ b/t/t6032-merge-large-rename.sh @@ -70,4 +70,34 @@ test_expect_success 'set merge.renamelimit to 5' ' test_rename 5 ok test_rename 6 fail +test_expect_success 'setup large simple rename' ' + git config --unset merge.renamelimit && + git config --unset diff.renamelimit && + + git reset --hard initial && + for i in $(count 200); do + make_text foo bar baz >$i + done && + git add . && + git commit -m create-files && + + git branch simple-change && + git checkout -b simple-rename && + + mkdir builtin && + git mv [0-9]* builtin/ && + git commit -m renamed && + + git checkout simple-change && + >unrelated-change && + git add unrelated-change && + git commit -m unrelated-change +' + +test_expect_success 'massive simple rename does not spam added files' ' + unset GIT_MERGE_VERBOSITY && + git merge --no-stat simple-rename | grep -v Removing >output && + test 5 -gt "$(wc -l < output)" +' + test_done -- 2.30.2