From: Stefan Beller <sbeller@google.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Brandon Williams <bmwill@google.com>,
"git@vger.kernel.org" <git@vger.kernel.org>,
Duy Nguyen <pclouds@gmail.com>
Subject: Re: [PATCHv5 4/5] worktree: get worktrees from submodules
Date: Wed, 7 Dec 2016 14:51:58 -0800 [thread overview]
Message-ID: <CAGZ79kZiS9dx6QUOcFYh8sSNoVsrv2eNLXJd6X54UekzUiC8VQ@mail.gmail.com> (raw)
In-Reply-To: <xmqqvauvuzna.fsf@gitster.mtv.corp.google.com>
On Wed, Dec 7, 2016 at 2:45 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Stefan Beller <sbeller@google.com> writes:
>
>> + submodule_common_dir = strbuf_detach(&sb, NULL);
>> + ret = get_worktrees_internal(submodule_common_dir, flags);
>> +
>> + free(submodule_gitdir);
>
> This sequence felt somewhat unusual. I would have written this
> without an extra variable, i.e.
>
> ret = get_worktrees_internal(sb.buf, flags);
> strbuf_release(&sb);
Yours is cleaner; I don't remember what I was thinking.
Feel free to squash it in; in case a resend is needed I will do that.
Thanks,
Stefan
next prev parent reply other threads:[~2016-12-07 22:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-07 21:01 [PATCHv5 0/5] submodule embedgitdirs Stefan Beller
2016-12-07 21:01 ` [PATCHv5 1/5] submodule: use absolute path for computing relative path connecting Stefan Beller
2016-12-07 21:01 ` [PATCHv5 2/5] submodule helper: support super prefix Stefan Beller
2016-12-07 21:01 ` [PATCHv5 3/5] test-lib-functions.sh: teach test_commit -C <dir> Stefan Beller
2016-12-07 21:01 ` [PATCHv5 4/5] worktree: get worktrees from submodules Stefan Beller
2016-12-07 22:45 ` Junio C Hamano
2016-12-07 22:51 ` Stefan Beller [this message]
2016-12-08 1:14 ` Brandon Williams
2016-12-07 21:01 ` [PATCHv5 5/5] submodule: add embed-git-dir function Stefan Beller
2016-12-07 23:03 ` Junio C Hamano
2016-12-07 23:37 ` Stefan Beller
2016-12-08 1:09 ` Brandon Williams
2016-12-08 11:01 ` Duy Nguyen
2016-12-07 22:35 ` [PATCHv5 0/5] submodule embedgitdirs Junio C Hamano
2016-12-07 23:34 ` Junio C Hamano
2016-12-07 23:39 ` Stefan Beller
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=CAGZ79kZiS9dx6QUOcFYh8sSNoVsrv2eNLXJd6X54UekzUiC8VQ@mail.gmail.com \
--to=sbeller@google.com \
--cc=bmwill@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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).