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
Unknown Object (File)
Wed, Nov 20, 7:39 PM
Unknown Object (File)
Tue, Nov 19, 3:51 AM
Unknown Object (File)
Sat, Nov 16, 2:57 AM
Unknown Object (File)
Tue, Nov 12, 1:25 PM
Unknown Object (File)
Fri, Nov 8, 5:57 AM
Unknown Object (File)
Oct 20 2024, 6:35 AM
Unknown Object (File)
Oct 2 2024, 12:39 AM
Unknown Object (File)
Sep 19 2024, 12:43 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