]> khamidou — GitHub mirrors - arcanist.git/commit
Generate Git patches with "\n" metadata line endings unconditionally
authorepriestley <git@epriestley.com>
Wed, 9 Jan 2013 21:51:51 +0000 (13:51 -0800)
committerepriestley <git@epriestley.com>
Wed, 9 Jan 2013 21:51:51 +0000 (13:51 -0800)
commit38e2e1336fde6dd8b135fa11af9882ad1bff71bf
treea252e273753479c534e6b4f0a8c5d36351631104
parent983537e6205317710605001d69a47c56db37c82c
Generate Git patches with "\n" metadata line endings unconditionally

Summary:
Fixes T2175. Git generates patches which have "\n" line endings on every system. We currently generate patches with system-dependent line endings.

Git accepts system-dependent line endings in almost call cases, but part of the parser tests for "\n" explicitly. T2175 has an example of this.

Test Plan:
Ran `arc export --git --revision D4366 > export.git` on a Windows machine, verified "\n" line endings. Ran the same with `--unified`, verified "\r\n" line endings.

(I didn't add any unit tests for this because it's Windows-dependent and very difficult to test meaningfully right now -- i.e., test that appliable patches are generated -- since the git reconstitution test doesn't run on Windows either, because we can't yet untar things there.)

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran
Maniphest Tasks: T2175

Differential Revision: https://secure.phabricator.com/D4373
src/parser/ArcanistBundle.php