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

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Fri Feb 1 14:20:43 EST 2019


spectral added a comment.


  In https://phab.mercurial-scm.org/D5744#84938, @yuja wrote:
  
  > > I did not add this to `revert --interactive`, since that does not currently have any way of getting args specified on the commandline that affect the whitespace settings (so I'm keeping `revert --interactive` *ignoring* the user's diff settings).
  >
  > Well, `hg revert --interactive` does respect the user's diff settings. I don't
  >  know why, but https://phab.mercurial-scm.org/rHGf37a69ec3f4717fdb4f00699ca06c225f106696c explicitly added `whitespace=True`.
  
  
  If I had to guess, I think that was just a copy/paste from `commit --interactive` without realizing the consequences; there were no tests added for `revert --interactive`, just for the git diffs (which was the subject of the patch).   I still think that taking these from any config is super unlikely to be intended or desirable behavior, but if we want to keep it just in case, I do have an alternate series available that does my original idea of making it respect `commands.{commit,revert}.interactive.{ignorews,ignoreblanklines,...}`.  The ultimate reason I abandoned that and went with the "only respect commandline options, not config, and don't do this for `revert --interactive`" patch series was because I had to include a note that said something like "if a user *does* set `commands.commit.interactive.{ignorews,ignoreblanklines,...}`, this will still trigger issue5839; it is unlikely that any user will want to set these options, though."
  
  It's up to you, though. I worry I'm too ingrained in the internal-software development culture where we control what versions people have and can provide quick assistance when users have questions or encounter problems. I might not be properly considering the issues people might run into outside of an enterprise situation.

REPOSITORY
  rHG Mercurial

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

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


More information about the Mercurial-devel mailing list