]> khamidou — GitHub mirrors - arcanist.git/commit
Patch rendering fixes
authorAndrew Gallagher <agallagher@fb.com>
Tue, 28 Feb 2012 04:04:43 +0000 (20:04 -0800)
committerAndrew Gallagher <agallagher@fb.com>
Tue, 28 Feb 2012 05:39:12 +0000 (21:39 -0800)
commitbd3ce3631adece042c9c318b1b1e46e5969d1273
tree28c57751e591ba3bed4d8cd7c99c748b900f6f74
parentee8c8cf4e72d65e6f09731a792ebd351913c8d88
Patch rendering fixes

Summary:
Not too familiar with the patch rendering code, but diff should fix
a few issues:
1) The current didn't seem to handle the case of an insertion only
diff (where the original text is empty).  Specifically, it would
still print a replacement line and would merge the line immediately
after the patch location into the patch application.
2) Patches with trailing newlines were rendered with an additional
newline.  This appears to be due to using ##explode## to break the
patch into lines.

Test Plan:
1) Verified that this fixed apache license linting for files that had
no license.
2) Checked that this didn't affect trailing-whitespace patch application.

Reviewers: epriestley, aran

Reviewed By: epriestley

CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D1715
src/lint/renderer/ArcanistLintRenderer.php