On Tue, May 20, 2014 at 08:06:50AM -0700, Junio C Hamano wrote:
> Jeff King writes:
>
> > You could do:
> >
> > #define DEFAULT_SIGNATURE git_version_string
> > static const char *signature = DEFAULT_SIGNATURE;
> >
> > ...
> >
> > if (signature == DEFAULT_SIGNATURE)
> > ...
> >
> > b
Jeff King writes:
> You could do:
>
> #define DEFAULT_SIGNATURE git_version_string
> static const char *signature = DEFAULT_SIGNATURE;
>
> ...
>
> if (signature == DEFAULT_SIGNATURE)
> ...
>
> but maybe that is getting a little unwieldy, considering the scope of
> the original proble
On Mon, May 19, 2014 at 10:46:21PM -0700, Jeremiah Mahler wrote:
> > Avoiding that is easy with an indirection, no? Something like this
> > at the top:
> >
> > static const char *the_default_signature = git_version_string;
> > static const char *signature = the_default_signature;
> >
> > an
On Mon, May 19, 2014 at 09:54:33AM -0700, Junio C Hamano wrote:
> Jeremiah Mahler writes:
>
> > On Sat, May 17, 2014 at 06:00:14AM -0400, Jeff King wrote:
> >>
>
> Avoiding that is easy with an indirection, no? Something like this
> at the top:
>
> static const char *the_default_signature =
Jeremiah Mahler writes:
> On Sat, May 17, 2014 at 06:00:14AM -0400, Jeff King wrote:
>>
>> If you wanted to know whether it was set, I guess you'd have to compare
>> it to the default, like:
>>
>> if (signature_file) {
>> if (signature && signature != git_version_string)
>>
On Sat, May 17, 2014 at 06:00:14AM -0400, Jeff King wrote:
> On Sat, May 17, 2014 at 01:59:11AM -0700, Jeremiah Mahler wrote:
>
> > > if (signature) {
> > > if (signature_file)
> > > die("you cannot specify both a signature and a signature-file");
> > > /* otherwise, we already hav
On Sat, May 17, 2014 at 01:59:11AM -0700, Jeremiah Mahler wrote:
> > if (signature) {
> > if (signature_file)
> > die("you cannot specify both a signature and a signature-file");
> > /* otherwise, we already have the value */
> > } else if (signature_file) {
> > struct
On Sat, May 17, 2014 at 03:42:24AM -0400, Jeff King wrote:
> On Sat, May 17, 2014 at 12:25:48AM -0700, Jeremiah Mahler wrote:
>
> > > We have routines for reading directly into a strbuf, which eliminates
> > > the need for this 1024-byte limit. We even have a wrapper that can make
> > > this much
On Sat, May 17, 2014 at 12:25:48AM -0700, Jeremiah Mahler wrote:
> > We have routines for reading directly into a strbuf, which eliminates
> > the need for this 1024-byte limit. We even have a wrapper that can make
> > this much shorter:
> >
> > struct strbuf buf = STRBUF_INIT;
> >
> > strbu
On Fri, May 16, 2014 at 04:14:45AM -0400, Jeff King wrote:
> On Thu, May 15, 2014 at 06:31:21PM -0700, Jeremiah Mahler wrote:
...
>
> A few questions/comments:
>
> > +static int signature_file_callback(const struct option *opt, const char
> > *arg,
> > +
On Thu, May 15, 2014 at 06:31:21PM -0700, Jeremiah Mahler wrote:
> Added feature that allows a signature file to be used with format-patch.
>
> $ git format-patch --signature-file ~/.signature -1
>
> Now signatures with newlines and other special characters can be
> easily included.
I think t
Added feature that allows a signature file to be used with format-patch.
$ git format-patch --signature-file ~/.signature -1
Now signatures with newlines and other special characters can be
easily included.
Signed-off-by: Jeremiah Mahler
---
Documentation/git-format-patch.txt | 7 +++
b
On Tue, May 13, 2014 at 09:07:12AM -0700, Jonathan Nieder wrote:
> Hi,
>
> Jeremiah Mahler wrote:
>
> > # from a string
> > $ git format-patch --signature "from a string" origin
> >
> > # or from a file
> > $ git format-patch --signature ~/.signature origin
>
> Interesting. But... what
13 matches
Mail list logo