From: Stephen Boyd <bebarino@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Christian Couder <chriscool@tuxfamily.org>, git@vger.kernel.org
Subject: Re: [PATCH] log-tree: fix patch filename computation in "git format-patch"
Date: Thu, 26 Mar 2009 21:31:05 -0700 [thread overview]
Message-ID: <780e0a6b0903262131l26e9ea6ua3289925fd322d93@mail.gmail.com> (raw)
In-Reply-To: <7v3acziot0.fsf@gitster.siamese.dyndns.org>
On Thu, Mar 26, 2009 at 9:15 PM, Junio C Hamano <gitster@pobox.com> wrote:
>
> Shouldn't it be just:
>
> size_t max_len = start_len + FORMAT_PATCH_NAME_MAX - suffix_len;
> if (max_len < buf->len)
> strbuf_setlen(buf, max_len);
> strbuf_addstr(buf, suffix);
Yes, this is good.
>
> The caller must make sure that suffix_len is sufficiently shorter than
> FORMAT_PATCH_NAME_MAX; I do not know if the current code does that,
> though.
>
The original code never did this. What should happen in this case?
I am away on travel this week, so I won't be able to update this until Monday.
Thanks,
Stephen
next prev parent reply other threads:[~2009-03-27 4:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-27 0:13 [PATCH] log-tree: fix patch filename computation in "git format-patch" Christian Couder
2009-03-27 4:15 ` Junio C Hamano
2009-03-27 4:31 ` Stephen Boyd [this message]
2009-03-27 7:15 ` Christian Couder
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=780e0a6b0903262131l26e9ea6ua3289925fd322d93@mail.gmail.com \
--to=bebarino@gmail.com \
--cc=chriscool@tuxfamily.org \
--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).