t6032: Add a test checking for excessive output from merge
Previous D/F fixes I submitted (5a2580d
andae74548
) had caused merge to become excessively spammy, which was fixed in96ecac6
(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 <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
7edba4c45c
commit
df0b99f004
@ -70,4 +70,34 @@ test_expect_success 'set merge.renamelimit to 5' '
|
|||||||
test_rename 5 ok
|
test_rename 5 ok
|
||||||
test_rename 6 fail
|
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
|
test_done
|
||||||
|
Loading…
Reference in New Issue
Block a user