Summary: Fixes T1555.
Test Plan: Added empty file, diffed it, exported and patched. Also manually created diff in Differential.
Reviewers: btrahan, epriestley
Reviewed By: btrahan
CC: aran, Korvin
Maniphest Tasks: T1555
Differential Revision: https://secure.phabricator.com/D3536
}
}
- if (!$is_binary) {
- $result[] = "--- {$old_target}";
- $result[] = "+++ {$cur_target}";
+ if ($change_body) {
+ if (!$is_binary) {
+ $result[] = "--- {$old_target}";
+ $result[] = "+++ {$cur_target}";
+ }
+ $result[] = $change_body;
}
- $result[] = $change_body;
}
$diff = implode("\n", $result)."\n";