From: Junio C Hamano <gitster@pobox.com>
To: Jacob Keller <jacob.e.keller@intel.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>,
Mark Strapetz <marc.strapetz@syntevo.com>,
Stefan Beller <sbeller@google.com>,
Jacob Keller <jacob.keller@gmail.com>
Subject: Re: [PATCH v5 3/3] git: submodule honor -c credential.* from command line
Date: Mon, 29 Feb 2016 10:20:54 -0800 [thread overview]
Message-ID: <xmqqmvqjcr95.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <1456532000-22971-4-git-send-email-jacob.e.keller@intel.com> (Jacob Keller's message of "Fri, 26 Feb 2016 16:13:20 -0800")
Jacob Keller <jacob.e.keller@intel.com> writes:
> +static int sanitize_submodule_config(const char *var, const char *value, void *data)
> +{
> + struct strbuf quoted = STRBUF_INIT;
> + struct strbuf *out = data;
> +
> + if (submodule_config_ok(var)) {
> + if (out->len)
> + strbuf_addch(out, ' ');
> +
> + sq_quotef(out, "%s=%s", var, value);
Can a configuration variable that comes from the original command
line be a boolean true that is spelled without "=true", i.e. can
value be NULL here?
> + }
> +
> + strbuf_release("ed);
> +
> + return 0;
> +}
> +
> +static void prepare_submodule_repo_env(struct argv_array *out)
> +{
> + const char * const *var;
> +
> + for (var = local_repo_env; *var; var++) {
> + if (!strcmp(*var, CONFIG_DATA_ENVIRONMENT)) {
> + struct strbuf sanitized_config = STRBUF_INIT;
> + git_config_from_parameters(sanitize_submodule_config,
> + &sanitized_config);
> + argv_array_pushf(out, "%s=%s", *var, sanitized_config.buf);
> + strbuf_release(&sanitized_config);
next prev parent reply other threads:[~2016-02-29 18:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-27 0:13 [PATCH v5 0/3] pass credential.* to submodules Jacob Keller
2016-02-27 0:13 ` [PATCH v5 1/3] sumodule--helper: fix submodule--helper clone usage and check argc count Jacob Keller
2016-02-29 17:49 ` Junio C Hamano
2016-02-29 19:34 ` Jacob Keller
2016-02-29 19:44 ` Junio C Hamano
2016-02-29 22:05 ` Jacob Keller
2016-02-27 0:13 ` [PATCH v5 2/3] quote: implement sq_quotef() Jacob Keller
2016-02-27 0:13 ` [PATCH v5 3/3] git: submodule honor -c credential.* from command line Jacob Keller
2016-02-29 18:20 ` Junio C Hamano [this message]
2016-02-29 19:37 ` Jacob Keller
2016-02-29 19:47 ` Junio C Hamano
2016-02-29 22:09 ` Jacob Keller
2016-02-27 0:37 ` [PATCH v5 0/3] pass credential.* to submodules Jacob Keller
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=xmqqmvqjcr95.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=jacob.keller@gmail.com \
--cc=marc.strapetz@syntevo.com \
--cc=peff@peff.net \
--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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.