mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-29 18:22: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,12 +412,14 @@ final class ArcanistBundle {
|
|||
}
|
||||
}
|
||||
|
||||
if ($change_body) {
|
||||
if (!$is_binary) {
|
||||
$result[] = "--- {$old_target}";
|
||||
$result[] = "+++ {$cur_target}";
|
||||
}
|
||||
$result[] = $change_body;
|
||||
}
|
||||
}
|
||||
|
||||
$diff = implode("\n", $result)."\n";
|
||||
return $this->convertNonUTF8Diff($diff);
|
||||
|
|
Loading…
Reference in a new issue