From: Eric Sunshine <sunshine@sunshineco.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>,
Junio C Hamano <gitster@pobox.com>,
Jacob Keller <jacob.keller@gmail.com>
Subject: Re: [PATCH v3 2/2] git: submodule honor -c credential.* from command line
Date: Thu, 25 Feb 2016 20:55:10 -0500 [thread overview]
Message-ID: <20160226015510.GA5347@flurp.local> (raw)
In-Reply-To: <1456426632-23257-2-git-send-email-jacob.e.keller@intel.com>
On Thu, Feb 25, 2016 at 10:57:12AM -0800, Jacob Keller wrote:
> [...]
> Replace all the calls to clear_local_git_env with a wrapped function
> that filters GIT_CONFIG_PARAMETERS using the new helper and then
> restores it to the filtered subset after clearing the rest of the
> environment.
>
> Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
> ---
> diff --git a/t/t7412-submodule--helper.sh b/t/t7412-submodule--helper.sh
> @@ -0,0 +1,25 @@
> +test_expect_success 'sanitize-config keeps credential.helper' '
> + git -c credential.helper="helper" submodule--helper sanitize-config >actual &&
> + echo "'\''credential.helper=helper'\''" >expect &&
Not worth a re-roll, but these quote sequences are brain-melting.
Easier would have been to double-quote the second argument of
test_expect_success() and then do either:
test_expect_success 'sanitize-config keeps credential.helper' "
git -c [...] submodule--helper sanitize-config >actual &&
echo \'credential.helper=helper\' >expect &&
test_cmp expect actual
"
or:
test_expect_success 'sanitize-config keeps credential.helper' "
git -c [...] submodule--helper sanitize-config >actual &&
cat >expect <<-\EOF &&
'credential.helper=helper'
EOF
test_cmp expect actual
"
> + test_cmp expect actual
> +'
> +
> +test_done
next prev parent reply other threads:[~2016-02-26 1:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-25 18:57 [PATCH v3 1/2] t/lib-http/apache.conf: load mod_unixd module in apache 2.4 Jacob Keller
2016-02-25 18:57 ` [PATCH v3 2/2] git: submodule honor -c credential.* from command line Jacob Keller
2016-02-26 1:55 ` Eric Sunshine [this message]
2016-02-26 2:19 ` Jacob Keller
2016-02-26 2:26 ` Eric Sunshine
2016-02-26 2:31 ` Jacob Keller
2016-02-26 6:07 ` Jeff King
2016-02-26 7:32 ` Jacob Keller
2016-02-25 22:00 ` [PATCH v3 1/2] t/lib-http/apache.conf: load mod_unixd module in apache 2.4 Jeff King
2016-02-25 23:16 ` Junio C Hamano
2016-02-25 23:17 ` Junio C Hamano
2016-02-25 23:18 ` Junio C Hamano
2016-02-25 23:39 ` Jacob Keller
2016-02-25 23:41 ` Junio C Hamano
2016-02-25 23:43 ` 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=20160226015510.GA5347@flurp.local \
--to=sunshine@sunshineco.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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 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).