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)
Thu, Apr 11, 8:32 AM
Unknown Object (File)
Wed, Apr 3, 5:50 AM
Unknown Object (File)
Tue, Apr 2, 8:17 PM
Unknown Object (File)
Sun, Mar 31, 9:28 PM
Unknown Object (File)
Jan 31 2024, 12:12 AM
Unknown Object (File)
Jan 24 2024, 9:01 AM
Unknown Object (File)
Dec 26 2023, 1:50 PM
Unknown Object (File)
Dec 21 2023, 2:17 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