Page MenuHomePhabricator

When generating diffs in "arc diff", disable Git config option "diff.suppressBlankEmpty"
ClosedPublic

Authored by epriestley on Oct 29 2019, 5:12 PM.
Tags
None
Referenced Files
F15498785: D20877.id49771.diff
Sun, Apr 13, 2:17 PM
F15494088: D20877.id49772.diff
Sat, Apr 12, 10:32 PM
F15492218: D20877.diff
Sat, Apr 12, 12:27 PM
F15475753: D20877.id.diff
Sun, Apr 6, 11:21 PM
F15472330: D20877.id49771.diff
Sat, Apr 5, 12:41 PM
F15472246: D20877.diff
Sat, Apr 5, 12:00 PM
F15459088: D20877.id.diff
Mon, Mar 31, 9:44 AM
F15457220: D20877.diff
Sun, Mar 30, 3:02 PM
Subscribers
None

Details

Summary

Ref T13432. Git has a "diff.suppressBlankEmpty" config option which makes it emit nonstandard diffs with trimmed trailing whitespace on unchanged blank lines.

Currently, we don't parse these diffs correctly. Even if we do in the future, emitting a more standard diff is desirable.

Explicitly disable this option when executing "git diff" so we build more standard diffs.

Test Plan
  • Configured this option.
  • Modified a file with a blank line in it without changing the blank line, got this goofy display diff:

Screen Shot 2019-10-29 at 10.09.14 AM.png (150×1 px, 21 KB)

  • Applied patch, rediffed the same change, saw "-c diff.suppressBlankEmpty" in "--trace" output and got this sensible diff:

Screen Shot 2019-10-29 at 10.09.28 AM.png (107×1 px, 17 KB)

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable