git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Stefan Beller <sbeller@google.com>
Cc: gitster@pobox.com, git@vger.kernel.org, Jens.Lehmann@web.de
Subject: Re: [PATCH] submodule: do no re-read name in shell script
Date: Wed, 20 Jul 2016 18:00:29 -0700	[thread overview]
Message-ID: <20160721010029.GG29326@google.com> (raw)
In-Reply-To: <20160721005122.15966-1-sbeller@google.com>

Stefan Beller wrote:

> Instead of making another call to a submodule helper (name), just
> propagate the value when we know it (in the update-clone helper) already.
>
> Signed-off-by: Stefan Beller <sbeller@google.com>
> ---
>  builtin/submodule--helper.c | 4 ++--
>  git-submodule.sh            | 3 +--
>  2 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
> index b22352b..494e088 100644
> --- a/builtin/submodule--helper.c
> +++ b/builtin/submodule--helper.c
> @@ -683,9 +683,9 @@ static int prepare_to_clone_next_submodule(const struct cache_entry *ce,
>  	needs_cloning = !file_exists(sb.buf);
> 
>  	strbuf_reset(&sb);
> -	strbuf_addf(&sb, "%06o %s %d %d\t%s\n", ce->ce_mode,
> +	strbuf_addf(&sb, "%06o %s %d %d %s\t%s\n", ce->ce_mode,
>  			sha1_to_hex(ce->sha1), ce_stage(ce),
> -			needs_cloning, ce->name);
> +			needs_cloning, sub->name, sub->path);

Are there any restrictions on what characters a submodule name can
contain?  Does this need e.g. to be quoted with sq_quote?

Thanks,
Jonathan

  reply	other threads:[~2016-07-21  1:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21  0:51 [PATCH] submodule: do no re-read name in shell script Stefan Beller
2016-07-21  1:00 ` Jonathan Nieder [this message]
2016-07-21  1:40   ` 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160721010029.GG29326@google.com \
    --to=jrnieder@gmail.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sbeller@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).