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

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Mon Feb 4 15:40:18 EST 2019


spectral added a comment.


  In https://phab.mercurial-scm.org/D5744#85051, @yuja wrote:
  
  > 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).
  
  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.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5744

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


More information about the Mercurial-devel mailing list