git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeremiah Mahler <jmmahler@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2] format-patch --signature-file <file>
Date: Mon, 19 May 2014 22:46:21 -0700	[thread overview]
Message-ID: <20140520054621.GA28317@hudson.localdomain> (raw)
In-Reply-To: <xmqqd2f93e0m.fsf@gitster.dls.corp.google.com>


On Mon, May 19, 2014 at 09:54:33AM -0700, Junio C Hamano wrote:
> Jeremiah Mahler <jmmahler@gmail.com> 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 = git_version_string;
>   static const char *signature = the_default_signature;
> 
> and comparing to see if signature points at the same address as
> the_default_signature would give you what you want, I think.

I like your suggestion for a default signature variable.
Unfortunately, C doesn't like it as much.

static const char *the_default_signature = git_version_string;
static const char *signature = the_default_signature;  // ERROR
// initializer element is not constant

-- 
Jeremiah Mahler
jmmahler@gmail.com
http://github.com/jmahler

  reply	other threads:[~2014-05-20  5:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-16  1:31 [PATCH v2] format-patch --signature-file <file> Jeremiah Mahler
2014-05-16  1:31 ` Jeremiah Mahler
2014-05-16  8:14   ` Jeff King
2014-05-17  7:25     ` Jeremiah Mahler
2014-05-17  7:42       ` Jeff King
2014-05-17  8:59         ` Jeremiah Mahler
2014-05-17 10:00           ` Jeff King
2014-05-17 15:39             ` Jeremiah Mahler
2014-05-19 16:54               ` Junio C Hamano
2014-05-20  5:46                 ` Jeremiah Mahler [this message]
2014-05-20  6:21                   ` Jeff King
2014-05-20 15:06                     ` Junio C Hamano
2014-05-21  0:45                       ` Jeremiah Mahler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140520054621.GA28317@hudson.localdomain \
    --to=jmmahler@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).