From: Carlos Rica <jasampler@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: gitster@pobox.com, git@vger.kernel.org
Subject: Re: [PATCH] builtin-tag.c: remove global variable to use the callback data of git-config.
Date: Tue, 17 Mar 2009 18:57:28 +0100 [thread overview]
Message-ID: <1b46aba20903171057r4fb4697eo3b8abc62a45fe858@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.0903171646140.6393@intel-tinevez-2-302>
On Tue, Mar 17, 2009 at 4:47 PM, Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
> Hi,
> On Tue, 17 Mar 2009, Carlos Rica wrote:
>> @@ -164,11 +162,10 @@ static int do_sign(struct strbuf *buffer)
>> int len;
>> int i, j;
>>
>> - if (!*signingkey) {
>> - if (strlcpy(signingkey, git_committer_info(IDENT_ERROR_ON_NO_NAME),
>> - sizeof(signingkey)) > sizeof(signingkey) - 1)
>> - return error("committer info too long.");
>> - bracket = strchr(signingkey, '>');
>> + if (!signingkey->buf[0]) {
>
> It is probably better to ask for !signingkey->len (think of trying to
> understand the code in 6 months from now).
I was in doubt here. By avoiding the use of signingkey->len I was
trying to say that you cannot rely in such field if we touch the
buffer directly, as it happens below:
bracket = strchr(signingkey->buf, '>');
if (bracket)
bracket[1] = '\0';
next prev parent reply other threads:[~2009-03-17 17:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-17 14:43 [PATCH] builtin-tag.c: remove global variable to use the callback data of git-config Carlos Rica
2009-03-17 15:47 ` Johannes Schindelin
2009-03-17 17:57 ` Carlos Rica [this message]
2009-03-17 18:45 ` Junio C Hamano
2009-03-17 22:27 ` Johannes Schindelin
2009-03-18 0:50 ` Carlos Rica
-- strict thread matches above, loose matches on Subject: below --
2009-03-24 19:54 Carlos Rica
2009-03-14 7:17 Carlos Rica
2009-03-14 20:54 ` Junio C Hamano
2009-03-16 11:46 ` Carlos Rica
2009-03-10 13:03 Carlos Rica
2009-03-10 13:34 ` Johannes Schindelin
2009-03-10 14:00 ` Carlos Rica
2009-03-10 16:36 ` Junio C Hamano
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=1b46aba20903171057r4fb4697eo3b8abc62a45fe858@mail.gmail.com \
--to=jasampler@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--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).