Page MenuHomePhabricator

D20877.diff
No OneTemporary

D20877.diff

diff --git a/src/repository/api/ArcanistGitAPI.php b/src/repository/api/ArcanistGitAPI.php
--- a/src/repository/api/ArcanistGitAPI.php
+++ b/src/repository/api/ArcanistGitAPI.php
@@ -464,15 +464,27 @@
*/
public function getFullGitDiff($base, $head = null) {
$options = $this->getDiffFullOptions();
+ $config_options = array();
+
+ // See T13432. Disable the rare "diff.suppressBlankEmpty" configuration
+ // option, which discards the " " (space) change type prefix on unchanged
+ // blank lines. At time of writing the parser does not handle these
+ // properly, but generating a more-standard diff is generally desirable
+ // even if a future parser handles this case more gracefully.
+
+ $config_options[] = '-c';
+ $config_options[] = 'diff.suppressBlankEmpty=false';
if ($head !== null) {
list($stdout) = $this->execxLocal(
- "diff {$options} %s %s --",
+ "%LR diff {$options} %s %s --",
+ $config_options,
$base,
$head);
} else {
list($stdout) = $this->execxLocal(
- "diff {$options} %s --",
+ "%LR diff {$options} %s --",
+ $config_options,
$base);
}

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 5:42 PM (21 h, 20 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6790403
Default Alt Text
D20877.diff (1 KB)

Event Timeline