HomeSealhub

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

Description

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

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:

{F6985234}

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

{F6985235}

Maniphest Tasks: T13432

Differential Revision: https://secure.phabricator.com/D20877

Details

Provenance
epriestleyAuthored on Oct 29 2019, 18:09
kuba-orlikPushed on Jan 24 2022, 10:17
Parents
R118:73943d1bc9d3: Make "arc land --merge" an explicit error when targeting a Perforce remote
Branches
Unknown
Tags
Unknown

Event Timeline