public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Stefan Beller <sbeller@google•com>
Cc: bmwill@google•com, git@vger•kernel.org, pclouds@gmail•com
Subject: Re: [PATCHv5 4/5] worktree: get worktrees from submodules
Date: Wed, 07 Dec 2016 14:45:29 -0800	[thread overview]
Message-ID: <xmqqvauvuzna.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20161207210157.18932-5-sbeller@google.com> (Stefan Beller's message of "Wed, 7 Dec 2016 13:01:56 -0800")

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);

  reply	other threads:[~2016-12-07 22:46 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 [this message]
2016-12-07 22:51     ` Stefan Beller
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=xmqqvauvuzna.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=bmwill@google$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=pclouds@gmail$(echo .)com \
    --cc=sbeller@google$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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