[PATCH 3 of 3] patchbomb: make --git-format-patch imply --plain

Yuya Nishihara yuya at tcha.org
Thu Nov 24 09:22:04 EST 2016


On Mon, 21 Nov 2016 08:15:44 +0100, Henning Schild wrote:
> Am Mon, 21 Nov 2016 14:17:32 +0900
> schrieb Yuya Nishihara <yuya at tcha.org>:
> > On Sun, 20 Nov 2016 12:47:44 +0100, Henning Schild wrote:
> > > I have played with templates to get "Signed-off-by"s into commit
> > > messages. That works but you have to configure it somewhere. Meaning
> > > that every fresh clone will require dreadful customization, or that
> > > global configuration will impose on every cloned repo.
> > > To me it seems like maintaining my own templates is harder than
> > > maintaining an mq in a custom mercurial. Using them you are
> > > basically programming out of the tree, in a strange and limited
> > > language. With a lot of references of what you expect the hg code
> > > to be, but no merge conflicts on updates, no testing etc. Thinking
> > > about it this way, templating is a fine mechanism for under the
> > > hood, but should never have been exposed to the configs.
> > > 
> > > Lets assume supporting the git-format-patch format was a wanted
> > > feature, and let us further assume "hg email" already used
> > > templates. hg or hg-git would than come with a template for it, but
> > > how would that get selected?  
> > 
> > Maybe "hg email -Tgit" (assuming we have a stock "git" template.)
> 
> If we can agree on that or another command line option, it would just
> be a matter of changing the first patch. Actually using templates would
> be another series.

It sounds worse to me than introducing --git-format-patch option. -T is a
semi-global option, which should work in the same way across commands. (and
I bet no one would be invested to start implementing the full templating
support just to get rid of the temporary -Tgit hack.)

So IMHO, --git-format-patch is better if we need the git-style patch email
without templates. That isn't nice, but we can mark the option as "(DEPRECATED)"
later.


More information about the Mercurial-devel mailing list