Page MenuHomePhabricator

parseDiff assumes GNU-style unified diff
Open, WishlistPublic

Description

Unlike GNU diff, Solaris's diff formats dates according to the current locale. For example:

> echo foo > foo
> env LANG=C diff -u /dev/null foo
--- /dev/null   Tue Oct 21 14:34:01 2014
+++ foo Tue Oct 21 14:24:53 2014
@@ -1,0 +1,1 @@
+foo
> env LANG=fr_FR diff -u /dev/null foo
--- /dev/null   mar. oct  21 14:33:51 2014
+++ foo mar. oct  21 14:24:53 2014
@@ -1,0 +1,1 @@
+foo

This isn't matched by the regular expression in ArcanistDiffParser.php, and prevents such diffs from being uploaded with the form at /differential/diff/create/.