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, Jan 9, 8:29 PM
Unknown Object (File)
Thu, Dec 26, 4:32 PM
Unknown Object (File)
Dec 14 2024, 10:11 AM
Unknown Object (File)
Dec 9 2024, 12:06 AM
Unknown Object (File)
Nov 28 2024, 12:35 AM
Unknown Object (File)
Nov 25 2024, 5:42 PM
Unknown Object (File)
Nov 20 2024, 7:39 PM
Unknown Object (File)
Nov 19 2024, 3:51 AM
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