git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3 2/2] git: submodule honor -c credential.* from command line

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Feb 26, 2016, 01:55 UTC
Message-ID
<20160226015510.GA5347@flurp.local>
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:
Show 13 quoted lines
> [...]
> 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
Previous: Jacob KellerNext: Jacob Keller
Message 3 of 15 in “t/lib-http/apache.conf: load mod_unixd module in apache 2.4”
  1. 1/2 t/lib-http/apache.conf: load mod_unixd module in apache 2.4Jacob Keller, Feb 25, 2016
  2. 2/2 git: submodule honor -c credential.* from command lineJacob Keller, Feb 25, 2016
  3. Eric SunshineFeb 26, 2016
  4. Jacob KellerFeb 26, 2016
  5. Eric SunshineFeb 26, 2016
  6. Jacob KellerFeb 26, 2016
  7. Jeff KingFeb 26, 2016
  8. Jacob KellerFeb 26, 2016
  9. Jeff KingFeb 25, 2016
  10. Junio C HamanoFeb 25, 2016
  11. Junio C HamanoFeb 25, 2016
  12. Junio C HamanoFeb 25, 2016
  13. Jacob KellerFeb 25, 2016
  14. Junio C HamanoFeb 25, 2016
  15. Jacob KellerFeb 25, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.