From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: sxenos@google.com
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2 6/8] evolve: Add support for writing metacommits
Date: Tue, 29 Jan 2019 12:15:54 +0100 [thread overview]
Message-ID: <20190129111554.GA13764@szeder.dev> (raw)
In-Reply-To: <20190127194128.161250-6-sxenos@google.com>
On Sun, Jan 27, 2019 at 11:41:26AM -0800, sxenos@google.com wrote:
> diff --git a/metacommit.c b/metacommit.c
> +static void compute_change_name(struct commit *initial_commit, struct strbuf* result)
> +{
> + struct strbuf default_name;
> + struct object_id unused;
> +
> + strbuf_init(&default_name, 0);
> + if (initial_commit) {
> + compute_default_change_name(initial_commit, &default_name);
> + } else {
> + strbuf_addstr(&default_name, "change");
> + }
> + strbuf_addstr(result, "refs/metas/");
> + strbuf_addstr(result, default_name.buf);
Please use the slightly more efficient strbuf_addbuf() function
instead.
next prev parent reply other threads:[~2019-01-29 11:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-27 19:41 [PATCH v2 1/8] technical doc: add a design doc for the evolve command sxenos
2019-01-27 19:41 ` [PATCH v2 2/8] sha1-array: Implement oid_array_readonly_contains sxenos
2019-01-28 13:05 ` SZEDER Gábor
[not found] ` <CABh8og41XhiYzg=X3to7M+zWszJq6a+n8bwHrwkU-GoxYa8-VQ@mail.gmail.com>
2019-01-29 11:15 ` SZEDER Gábor
2019-01-27 19:41 ` [PATCH v2 3/8] ref-filter: Add the metas namespace to ref-filter sxenos
2019-01-27 19:41 ` [PATCH v2 4/8] evolve: Add support for parsing metacommits sxenos
2019-01-27 19:41 ` [PATCH v2 5/8] evolve: Add the change-table structure sxenos
2019-01-27 19:41 ` [PATCH v2 6/8] evolve: Add support for writing metacommits sxenos
2019-01-29 11:15 ` SZEDER Gábor [this message]
2019-01-27 19:41 ` [PATCH v2 7/8] evolve: Implement the git change command sxenos
2019-01-27 19:41 ` [PATCH v2 8/8] evolve: Add the git change list command sxenos
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=20190129111554.GA13764@szeder.dev \
--to=szeder.dev@gmail.com \
--cc=git@vger.kernel.org \
--cc=sxenos@google.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).