mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-26 00:32:41 +01:00
Handle empty file add in Git export
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
This commit is contained in:
parent
6bd2b372f5
commit
22c51d0d71
1 changed files with 6 additions and 4 deletions
|
@ -412,11 +412,13 @@ final class ArcanistBundle {
|
|||
}
|
||||
}
|
||||
|
||||
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";
|
||||
|
|
Loading…
Reference in a new issue