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

Yuya Nishihara yuya at tcha.org
Thu Jan 31 17:55:33 EST 2019


>   I wasn't able to come up with a reason to support these but only when committing interactively (as I said in the commit description), but I guess there's justification in https://www.mercurial-scm.org/pipermail/mercurial-devel/2011-June/032316.html.
>   
>   So I think I can understand why this is desired for this command. Maybe a better option is to change the difffeatureopts() call to replace the section that it looks in? i.e. change:
>   
>     diffopts = patch.difffeatureopts(repo.ui, whitespace=True)
>   
>   to:
>   
>     diffopts = patch.difffeatureopts(repo.ui, section='commands-interactive', whitespace=True)
>   
>   This way we aren't looking at the `[diff]` section, so the options specified on the commandline end up working, and if someone really does want this as a default, they can get that behavior.
>   
>   I'm not at all attached to that section name, i.e. I could see this being something like the following, to make it look at commands.commit.interactive.ignorews (and others):
>   
>     diffopts = patch.difffeatureopts(repo.ui, section='commands', configprefix='commit.interactive.', whitespace=True)
>   
>   I think I like that option, I'll send a patch for it.

I can't think of a nicer section name, but I like the idea in general. We'll
also need to apply that to `hg revert --interactive`.


More information about the Mercurial-devel mailing list