From: Jacopo Notarstefano <jacopo.notarstefano@gmail.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
Michael Haggerty <mhagger@alum.mit.edu>,
Christian Couder <christian.couder@gmail.com>
Subject: Re: [PATCH] branch.c: delete size check of newly tracked branch names
Date: Fri, 28 Feb 2014 13:14:44 +0100 [thread overview]
Message-ID: <CAL0uuq263WEFWvZFDeqdN4=fAJGPUtux2wwFGOUQEMfzmDOweQ@mail.gmail.com> (raw)
In-Reply-To: <CACsJy8A7jVM1wdU2BK-NyQ5HJoY_19oKhSXCKqV_7qNN+OA+mw@mail.gmail.com>
> Nice. new_ref is passed in install_branch_config() in latest code. I
> guess you already made sure this function did not make any assumption
> about new_ref's length?
>
The function install_branch_config uses the strbuf, as I wrote in the
commit message. The contents of this buffer are then fed to
git_config_set, which, after a few more function calls, parses the key
with git_config_parse_key. This function does not rely on any
assumptions (as far as I can tell!) on the name's length, and
allocates enough space for it in
https://github.com/git/git/blob/master/config.c#L1462.
next prev parent reply other threads:[~2014-02-28 12:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 11:09 [PATCH] branch.c: delete size check of newly tracked branch names Jacopo Notarstefano
2014-02-28 11:16 ` Jacopo Notarstefano
2014-02-28 11:41 ` Duy Nguyen
2014-02-28 12:14 ` Jacopo Notarstefano [this message]
2014-02-28 12:43 ` Duy Nguyen
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='CAL0uuq263WEFWvZFDeqdN4=fAJGPUtux2wwFGOUQEMfzmDOweQ@mail.gmail.com' \
--to=jacopo.notarstefano@gmail.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=mhagger@alum.mit.edu \
--cc=pclouds@gmail.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).