This is an archive of the discontinued Mercurial Phabricator instance.

diff: support ignoring config settings when parsing optional diffopts
AbandonedPublic

Authored by spectral on Jan 31 2019, 6:49 PM.

Details

Reviewers
None
Group Reviewers
hg-reviewers
Summary

Previously, there was no supported way of respecting diff options set on the
command line without picking up potentially breaking settings from the config.

With this change, we can call difffeatureopts(..., whitespace='noconfig') to
ignore the user's config for the whitespace category of "optional features",
but respect options set on the commandline (even whitespace options) and respect
the user's config for "non-optional features" (nodates, showfunc, context).

It's not clear if that last aspect is useful, but it seemed plausible that
setting diff.nodates or diff.showfunc should be respected even when running
commit --interactive, while it seems unlikely that the user intended to have
diff.ignoreblanklines apply when calling commit --interactive.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped