D5744: commit: ignore diff whitespace settings when doing `commit -i` (issue5839)

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Tue Feb 5 07:03:42 EST 2019

yuja added a comment.

  >   > I agree with that we would never set the `commands.commit.interactive.{...}`
  >   >  in hgrc, but the feature itself is useful if you have to work on unclean
  >   >  codebase unlike in Google. For example, I sometimes need to commit changes
  >   >  ignoring unrelated whitespace cleanups made by editor or code formatter,
  >   >  because I can't control the development workflow.
  >   >
  >   > That's why I thought there would be users relying on the current behavior.
  >   I think I understand what you're saying.  I was under the impression that what we cared about was that `hg record -b` should continue working. Since there are no diffopts available on `hg commit -i`, you're thinking that this could be written as `hg commit -i --config commands.commit.interactive.ignorews=1`.
  >   While I'm sympathetic to that argument, it is so long and unwieldy that I think I'd recommend that users just do `hg --config extensions.record= record -b` (or, more likely, set `[extensions] record=` in their hgrc).
  Yeah. If we didn't have the same issue for revert, I would agree with that and
  dropping `--config diff.*` support from `hg commit -i`.
  >   I'll send the other patch series, we can discuss this on the relevant patches instead of keeping most of the discussion in a (somewhat unrelated) patch.  I've sent https://phab.mercurial-scm.org/D5832-D5834 with the config option approach, and still have D5877-D5878 as the "only respect commandline args" approach.
  I've queued https://phab.mercurial-scm.org/D5832-D5834 as it can provide escape hatch for a potential BC.
  Many thanks!

  rHG Mercurial


To: spectral, #hg-reviewers
Cc: durin42, yuja, navaneeth.suresh, mercurial-devel

More information about the Mercurial-devel mailing list