avoid STDERR diff3 messages when using wfMerge()
authorDaniel Kinzler <daniel.kinzler@wikimedia.de>
Sat, 10 Nov 2012 16:18:12 +0000 (17:18 +0100)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 10 Nov 2012 17:26:08 +0000 (17:26 +0000)
commit2c85e0dd5b690f819832d447a616781d2e7bdb8c
tree33c316be9e6c2c32a612b2c4ab1073ea5ce462fa
parent6670bf66dfa0a0ae6025c63e16094bb65a9ada38
avoid STDERR diff3 messages when using wfMerge()

diff3 issues a warning to stderr if any of the files does not end with a
newline character.

TextContent::preSaveTransform() does normalize revision text by simply
calling trim().  Thus to avoid a diff3 error we simply apply the same
normalization and add a newline to please the command.

Change-Id: I7baa3df95dd70cbc865b2491ccc791e60f8b9e6e
includes/GlobalFunctions.php
tests/phpunit/includes/GlobalFunctions/GlobalTest.php