Re: [PATCH v5] format-patch --signature-file

2014-05-21 Thread Jeremiah Mahler
On Wed, May 21, 2014 at 04:47:39PM -0400, Jeff King wrote: > On Wed, May 21, 2014 at 11:26:18AM -0700, Junio C Hamano wrote: > ... > I think the ratio of usefulness to number of words in this sub-thread is > getting off. I'd be OK with any of: ... > > -Peff I think this has become a discussion a

Re: [PATCH v5] format-patch --signature-file

2014-05-21 Thread Jeff King
On Wed, May 21, 2014 at 11:26:18AM -0700, Junio C Hamano wrote: > Yeah, I agree with the last sentence. My mention of "cleansing" > took into account your "do we want to omit the leading blank as > well?" as well. In any case, wouldn't reusing stripspace() make the > fix-up shorter? Not really.

Re: [PATCH v5] format-patch --signature-file

2014-05-21 Thread Junio C Hamano
Jeff King writes: > On Wed, May 21, 2014 at 10:37:05AM -0700, Junio C Hamano wrote: > >> > I wasn't planning on anything as drastic as stripspace. I really just >> > wanted to suppress the one newline, which is almost certainly the right >> > thing to include for "--signature", but the wrong thin

Re: [PATCH v5] format-patch --signature-file

2014-05-21 Thread Jeff King
On Wed, May 21, 2014 at 10:37:05AM -0700, Junio C Hamano wrote: > > I wasn't planning on anything as drastic as stripspace. I really just > > wanted to suppress the one newline, which is almost certainly the right > > thing to include for "--signature", but the wrong thing for > > "--signature-fil

Re: [PATCH v5] format-patch --signature-file

2014-05-21 Thread Junio C Hamano
Jeff King writes: > On Tue, May 20, 2014 at 11:46:51AM -0700, Junio C Hamano wrote: > >> Jeff King writes: >> >> > If it were just "--signature", I'd agree. After all, nobody is even >> > complaining. But this is also in preparation for --signature-file. >> > Should the user create a file witho

Re: [PATCH v5] format-patch --signature-file

2014-05-21 Thread Jeff King
On Wed, May 21, 2014 at 09:55:43AM -0700, Jeremiah Mahler wrote: > I am fine with including your previous patch. I think that would be my preference, but we'll see what Junio says. > Would like me to test it out and create another patch set? Yeah, that would be the logical next step. I think th

Re: [PATCH v5] format-patch --signature-file

2014-05-21 Thread Jeremiah Mahler
On Wed, May 21, 2014 at 12:42:55PM -0400, Jeff King wrote: > On Tue, May 20, 2014 at 11:46:51AM -0700, Junio C Hamano wrote: > > > Jeff King writes: > > > > > If it were just "--signature", I'd agree. After all, nobody is even > > > complaining. But this is also in preparation for --signature-fi

Re: [PATCH v5] format-patch --signature-file

2014-05-21 Thread Jeff King
On Tue, May 20, 2014 at 11:46:51AM -0700, Junio C Hamano wrote: > Jeff King writes: > > > If it were just "--signature", I'd agree. After all, nobody is even > > complaining. But this is also in preparation for --signature-file. > > Should the user create a file without a trailing newline? > >

Re: [PATCH v5] format-patch --signature-file

2014-05-20 Thread Jeremiah Mahler
On Tue, May 20, 2014 at 04:27:40AM -0400, Jeff King wrote: > On Tue, May 20, 2014 at 01:00:06AM -0700, Jeremiah Mahler wrote: > ... > > +test_expect_success 'format-patch --signature-file=file' ' > > + git format-patch --stdout --signature-file=expect -1 >output && > > + check_patch output &&

Re: [PATCH v5] format-patch --signature-file

2014-05-20 Thread Junio C Hamano
Jeff King writes: > If it were just "--signature", I'd agree. After all, nobody is even > complaining. But this is also in preparation for --signature-file. > Should the user create a file without a trailing newline? Ahh, I missed that part. I am fine with processing it with stripspace(). By t

Re: [PATCH v5] format-patch --signature-file

2014-05-20 Thread Jeff King
On Tue, May 20, 2014 at 10:53:11AM -0700, Junio C Hamano wrote: > I actually think these "supress extra LFs" trying to be overly smart > and inviting unnecessary surprises. Unlike log messages people type > (in which we do squash runs of blank lines and other prettifying), > mail-signature string

Re: [PATCH v5] format-patch --signature-file

2014-05-20 Thread Junio C Hamano
Jeff King writes: > But one could easily specify a longer, multi-line signature, > like: > > git format-patch --signature=' > this is my long signature > > it has multiple lines > ' ... > > We should notice that it already has its own trailing > newline, and suppress one of ours. > > Sign

Re: [PATCH v5] format-patch --signature-file

2014-05-20 Thread Jeff King
On Tue, May 20, 2014 at 01:00:06AM -0700, Jeremiah Mahler wrote: > Added option that allows a signature file to be used with format-patch > so that signatures with newlines and other special characters can be > easily included. > > $ git format-patch --signature-file ~/.signature -1 > > The co

[PATCH v5] format-patch --signature-file

2014-05-20 Thread Jeremiah Mahler
Added option that allows a signature file to be used with format-patch so that signatures with newlines and other special characters can be easily included. $ git format-patch --signature-file ~/.signature -1 The config variable format.signaturefile is also provided so that it can be added by d

[PATCH v5] format-patch --signature-file

2014-05-20 Thread Jeremiah Mahler
v5 of patch to add format-patch --signature-file option. This revision includes more suggestions from Jeff King and Junio C Hamano: - Use git_config_pathname instead of git_config_string for ~ expansion. - Eliminated head/tail --lines which is not POSIX compliant. Replaced with sed equi