Page MenuHomePhabricator

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

Authored by epriestley on Tue, Oct 29, 5:12 PM.

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:

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

Diff Detail

Repository
rARC Arcanist
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.