Re: [PATCH 0/7] teach branch-specific options for format-patch
- From
Denton Liu <liu.denton@gmail.com>
- Date
- May 7, 2019, 14:19 UTC
- Message-ID
- <20190507141942.GA359@archbookpro.localdomain>
- In-Reply-To
- <xmqq4l66myn3.fsf@gitster-ct.c.googlers.com>
Hi Junio,
On Tue, May 07, 2019 at 05:56:00PM +0900, Junio C Hamano wrote:
Show 20 quoted lines
> Denton Liu <liu.denton@gmail.com> writes: > > > Currently, format-patch only accepts branch.<name>.description as a > > branch-specific configuration variable. However, there are many other > > options which would be useful to have on a branch-by-branch basis, > > namely cover letter subject and To: and Cc: headers. > > > > Teach format-patch to recognise these branch-specific configuration > > options. > > > > Note that this patchset[1] was created using these new configuration > > options: > > > > [branch "submitted/fix-revisions-txt"] > > coverSubject = "cleanup revisions.txt" > > cc = "Andreas Heiduk <asheiduk@gmail.com>" > > cc = "Duy Nguyen <pclouds@gmail.com>" > > cc = "Junio C Hamano <gitster@pobox.com>" > > Do we have format.<something> configuration for these things?
Currently, we have format.{to,cc} but not format.coverSubject. The reason why is that for the cover-subject, I didn't think that it would make a lot of sense to have a general configuration for this since it varies between branches, just like how branch.<name>.description does not have a matching format.description.
Show 6 quoted lines
> > What I am trying to get at is if these are better structured similar > to http options where http.<something> supplies the overall default > for <something>, while http.<destination>.<something> gives a more > destination site specific override of that default. I.e. format.cc > is used as fallback, while format.<branch>.cc is used to override.
The reason why I chose to use branch.<name>.* is because format-patch currently reads from branch.<name>.description and I wanted to build on top of that. In addition, I didn't want to scatter branch-specific configs in two different place (i.e. have a branch.<branchName>.description alongside a format.<branchName>.coverSubject).
Show 5 quoted lines
> > In any case, it smells to me that branch.<branch>.cc does not hint > strongly enough that they are meant to affect format-patch. > >
Would you suggest moving to a format.<branchname>.* approach or would it make sense to rename the configs to something like branch.<name>.{emailCoverSubject,emailTo,emailCc}?
Thanks,
Denton