1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-20 08:58:55 +02: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:
vrana 2012-09-21 10:23:04 -07:00
parent 6bd2b372f5
commit 22c51d0d71

View file

@ -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";