(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'test_description='> name:test_description) op: assign_op.Equal rhs: {(SQ <'Test git config in different settings'>)} spids: [13] ) ] redirects: [] ) (C {<.>} {<'./test-lib.sh'>}) (C {<test_expect_success>} {(SQ <'clear default config'>)} {(SQ <'\n'> <'\trm -f .git/config\n'>)}) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 49 stdin_parts: [<'[core]\n'> <'\tpenguin = little blue\n'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <initial>)} { (SQ <'\n'> <'\tgit config core.penguin "little blue" &&\n'> <'\ttest_cmp expect .git/config\n'>) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 77 stdin_parts: [<'[core]\n'> <'\tpenguin = little blue\n'> <'\tMovie = BadPhysics\n'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'mixed case'>)} {(SQ <'\n'> <'\tgit config Core.Movie BadPhysics &&\n'> <'\ttest_cmp expect .git/config\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 107 stdin_parts: [ <'[core]\n'> <'\tpenguin = little blue\n'> <'\tMovie = BadPhysics\n'> <'[Cores]\n'> <'\tWhatEver = Second\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'similar section'>)} {(SQ <'\n'> <'\tgit config Cores.WhatEver Second &&\n'> <'\ttest_cmp expect .git/config\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 138 stdin_parts: [ <'[core]\n'> <'\tpenguin = little blue\n'> <'\tMovie = BadPhysics\n'> <'\tUPPERCASE = true\n'> <'[Cores]\n'> <'\tWhatEver = Second\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'uppercase section'>)} {(SQ <'\n'> <'\tgit config CORE.UPPERCASE true &&\n'> <'\ttest_cmp expect .git/config\n'>)} ) (C {<test_expect_success>} {(SQ <'replace with non-match'>)} {(SQ <'\n'> <'\tgit config core.penguin kingpin !blue\n'>)} ) (C {<test_expect_success>} {(SQ <'replace with non-match (actually matching)'>)} {(SQ <'\n'> <'\tgit config core.penguin "very blue" !kingpin\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 194 stdin_parts: [ <'[core]\n'> <'\tpenguin = very blue\n'> <'\tMovie = BadPhysics\n'> <'\tUPPERCASE = true\n'> <'\tpenguin = kingpin\n'> <'[Cores]\n'> <'\tWhatEver = Second\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'non-match result'>)} {(SQ <'test_cmp expect .git/config'>)}) (C {<test_expect_success>} {(SQ <'find mixed-case key by canonical name'>)} { (SQ <'\n'> <'\techo Second >expect &&\n'> <'\tgit config cores.whatever >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'find mixed-case key by non-canonical name'>)} { (SQ <'\n'> <'\techo Second >expect &&\n'> <'\tgit config CoReS.WhAtEvEr >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'subsections are not canonicalized by git-config'>)} { (SQ <'\n'> <'\tcat >>.git/config <<-\\EOF &&\n'> <'\t[section.SubSection]\n'> <'\tkey = one\n'> <'\t[section "SubSection"]\n'> <'\tkey = two\n'> <'\tEOF\n'> <'\techo one >expect &&\n'> <'\tgit config section.subsection.key >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\techo two >expect &&\n'> <'\tgit config section.SubSection.key >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'.git/config'>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>} here_end_span_id: 273 stdin_parts: [ <'[alpha]\n'> <'bar = foo\n'> <'[beta]\n'> <'baz = multiple \\\n'> <'lines\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'unset with cont. lines'>)} {(SQ <'\n'> <'\tgit config --unset beta.baz\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>} here_end_span_id: 300 stdin_parts: [<'[alpha]\n'> <'bar = foo\n'> <'[beta]\n'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'unset with cont. lines is correct'>)} {(SQ <'test_cmp expect .git/config'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'.git/config'>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 337 stdin_parts: [ <'[beta] ; silly comment # another comment\n'> <'noIndent= sillyValue ; \'nother silly comment\n'> <'\n'> <'# empty line\n'> <'\t\t; comment\n'> <'\t\thaha ='> <Id.Right_DoubleQuote '"'> <beta> <Id.Right_DoubleQuote '"'> <' # last silly comment\n'> <'haha = hello\n'> <'\thaha = bello\n'> <'[nextSection] noNewline = ouch\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<cp>} {<'.git/config'>} {<'.git/config2'>}) (C {<test_expect_success>} {(SQ <'multiple unset'>)} {(SQ <'\n'> <'\tgit config --unset-all beta.haha\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 375 stdin_parts: [ <'[beta] ; silly comment # another comment\n'> <'noIndent= sillyValue ; \'nother silly comment\n'> <'\n'> <'# empty line\n'> <'\t\t; comment\n'> <'[nextSection] noNewline = ouch\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'multiple unset is correct'>)} {(SQ <'\n'> <'\ttest_cmp expect .git/config\n'>)} ) (C {<cp>} {<'.git/config2'>} {<'.git/config'>}) (C {<test_expect_success>} {(SQ <'--replace-all missing value'>)} { (SQ <'\n'> <'\ttest_must_fail git config --replace-all beta.haha &&\n'> <'\ttest_cmp .git/config2 .git/config\n'> ) } ) (C {<rm>} {<'.git/config2'>}) (C {<test_expect_success>} {(SQ <--replace-all>)} {(SQ <'\n'> <'\tgit config --replace-all beta.haha gamma\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 444 stdin_parts: [ <'[beta] ; silly comment # another comment\n'> <'noIndent= sillyValue ; \'nother silly comment\n'> <'\n'> <'# empty line\n'> <'\t\t; comment\n'> <'\thaha = gamma\n'> <'[nextSection] noNewline = ouch\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'all replaced'>)} {(SQ <'\n'> <'\ttest_cmp expect .git/config\n'>)}) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 476 stdin_parts: [ <'[beta] ; silly comment # another comment\n'> <'noIndent= sillyValue ; \'nother silly comment\n'> <'\n'> <'# empty line\n'> <'\t\t; comment\n'> <'\thaha = alpha\n'> <'[nextSection] noNewline = ouch\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'really mean test'>)} {(SQ <'\n'> <'\tgit config beta.haha alpha &&\n'> <'\ttest_cmp expect .git/config\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 509 stdin_parts: [ <'[beta] ; silly comment # another comment\n'> <'noIndent= sillyValue ; \'nother silly comment\n'> <'\n'> <'# empty line\n'> <'\t\t; comment\n'> <'\thaha = alpha\n'> <'[nextSection]\n'> <'\tnonewline = wow\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'really really mean test'>)} { (SQ <'\n'> <'\tgit config nextsection.nonewline wow &&\n'> <'\ttest_cmp expect .git/config\n'>) } ) (C {<test_expect_success>} {(SQ <'get value'>)} { (SQ <'\n'> <'\techo alpha >expect &&\n'> <'\tgit config beta.haha >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 555 stdin_parts: [ <'[beta] ; silly comment # another comment\n'> <'noIndent= sillyValue ; \'nother silly comment\n'> <'\n'> <'# empty line\n'> <'\t\t; comment\n'> <'[nextSection]\n'> <'\tnonewline = wow\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <unset>)} {(SQ <'\n'> <'\tgit config --unset beta.haha &&\n'> <'\ttest_cmp expect .git/config\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 588 stdin_parts: [ <'[beta] ; silly comment # another comment\n'> <'noIndent= sillyValue ; \'nother silly comment\n'> <'\n'> <'# empty line\n'> <'\t\t; comment\n'> <'[nextSection]\n'> <'\tnonewline = wow\n'> <'\tNoNewLine = wow2 for me\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <multivar>)} { (SQ <'\n'> <'\tgit config nextsection.NoNewLine "wow2 for me" "for me$" &&\n'> <'\ttest_cmp expect .git/config\n'> ) } ) (C {<test_expect_success>} {(SQ <non-match>)} {(SQ <'\n'> <'\tgit config --get nextsection.nonewline !for\n'>)} ) (C {<test_expect_success>} {(SQ <'non-match value'>)} { (SQ <'\n'> <'\techo wow >expect &&\n'> <'\tgit config --get nextsection.nonewline !for >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'multi-valued get returns final one'>)} { (SQ <'\n'> <'\techo "wow2 for me" >expect &&\n'> <'\tgit config --get nextsection.nonewline >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'multi-valued get-all returns all'>)} { (SQ <'\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\twow\n'> <'\twow2 for me\n'> <'\tEOF\n'> <'\tgit config --get-all nextsection.nonewline >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 678 stdin_parts: [ <'[beta] ; silly comment # another comment\n'> <'noIndent= sillyValue ; \'nother silly comment\n'> <'\n'> <'# empty line\n'> <'\t\t; comment\n'> <'[nextSection]\n'> <'\tnonewline = wow3\n'> <'\tNoNewLine = wow2 for me\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'multivar replace'>)} { (SQ <'\n'> <'\tgit config nextsection.nonewline "wow3" "wow$" &&\n'> <'\ttest_cmp expect .git/config\n'> ) } ) (C {<test_expect_success>} {(SQ <'ambiguous unset'>)} {(SQ <'\n'> <'\ttest_must_fail git config --unset nextsection.nonewline\n'>)} ) (C {<test_expect_success>} {(SQ <'invalid unset'>)} {(SQ <'\n'> <'\ttest_must_fail git config --unset somesection.nonewline\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 734 stdin_parts: [ <'[beta] ; silly comment # another comment\n'> <'noIndent= sillyValue ; \'nother silly comment\n'> <'\n'> <'# empty line\n'> <'\t\t; comment\n'> <'[nextSection]\n'> <'\tNoNewLine = wow2 for me\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'multivar unset'>)} { (SQ <'\n'> <'\tgit config --unset nextsection.nonewline "wow3$" &&\n'> <'\ttest_cmp expect .git/config\n'> ) } ) (C {<test_expect_success>} {(SQ <'invalid key'>)} {(SQ <'test_must_fail git config inval.2key blabla'>)} ) (C {<test_expect_success>} {(SQ <'correct key'>)} {(SQ <'git config 123456.a123 987'>)}) (C {<test_expect_success>} {(SQ <'hierarchical section'>)} {(SQ <'\n'> <'\tgit config Version.1.2.3eX.Alpha beta\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 809 stdin_parts: [ <'[beta] ; silly comment # another comment\n'> <'noIndent= sillyValue ; \'nother silly comment\n'> <'\n'> <'# empty line\n'> <'\t\t; comment\n'> <'[nextSection]\n'> <'\tNoNewLine = wow2 for me\n'> <'[123456]\n'> <'\ta123 = 987\n'> <'[Version '> <Id.Right_DoubleQuote '"'> <1.2.3eX> <Id.Right_DoubleQuote '"'> <']\n'> <'\tAlpha = beta\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'hierarchical section value'>)} {(SQ <'\n'> <'\ttest_cmp expect .git/config\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 838 stdin_parts: [ <'beta.noindent=sillyValue\n'> <'nextsection.nonewline=wow2 for me\n'> <'123456.a123=987\n'> <'version.1.2.3eX.alpha=beta\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'working --list'>)} {(SQ <'\n'> <'\tgit config --list > output &&\n'> <'\ttest_cmp expect output\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin:{<EOF>} here_end_span_id:863 stdin_parts:[]) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'--list without repo produces empty output'>)} { (SQ <'\n'> <'\tgit --git-dir=nonexistent config --list >output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 893 stdin_parts: [ <'beta.noindent\n'> <'nextsection.nonewline\n'> <'123456.a123\n'> <'version.1.2.3eX.alpha\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'--name-only --list'>)} {(SQ <'\n'> <'\tgit config --name-only --list >output &&\n'> <'\ttest_cmp expect output\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 921 stdin_parts: [<'beta.noindent sillyValue\n'> <'nextsection.nonewline wow2 for me\n'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <--get-regexp>)} {(SQ <'\n'> <'\tgit config --get-regexp in >output &&\n'> <'\ttest_cmp expect output\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 949 stdin_parts: [<'beta.noindent\n'> <'nextsection.nonewline\n'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'--name-only --get-regexp'>)} { (SQ <'\n'> <'\tgit config --name-only --get-regexp in >output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 977 stdin_parts: [<'wow2 for me\n'> <'wow4 for you\n'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <--add>)} { (SQ <'\n'> <'\tgit config --add nextsection.nonewline "wow4 for you" &&\n'> <'\tgit config --get-all nextsection.nonewline > output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'.git/config'>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 1008 stdin_parts: [<'[novalue]\n'> <'\tvariable\n'> <'[emptyvalue]\n'> <'\tvariable =\n'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'get variable with no value'>)} {(SQ <'\n'> <'\tgit config --get novalue.variable ^$\n'>)} ) (C {<test_expect_success>} {(SQ <'get variable with empty value'>)} {(SQ <'\n'> <'\tgit config --get emptyvalue.variable ^$\n'>)} ) (command.Simple words: [{<echo>} {<novalue.variable>}] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'get-regexp variable with no value'>)} {(SQ <'\n'> <'\tgit config --get-regexp novalue > output &&\n'> <'\ttest_cmp expect output\n'>)} ) (command.Simple words: [{<echo>} {(SQ <'novalue.variable true'>)}] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'get-regexp --bool variable with no value'>)} { (SQ <'\n'> <'\tgit config --bool --get-regexp novalue > output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (command.Simple words: [{<echo>} {(SQ <'emptyvalue.variable '>)}] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'get-regexp variable with empty value'>)} { (SQ <'\n'> <'\tgit config --get-regexp emptyvalue > output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (command.Simple words: [{<echo>} {<true>}] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'get bool variable with no value'>)} { (SQ <'\n'> <'\tgit config --bool novalue.variable > output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (command.Simple words: [{<echo>} {<false>}] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'get bool variable with empty value'>)} { (SQ <'\n'> <'\tgit config --bool emptyvalue.variable > output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'no arguments, but no crash'>)} { (SQ <'\n'> <'\ttest_must_fail git config >output 2>&1 &&\n'> <'\ttest_i18ngrep usage output\n'>) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'.git/config'>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 1174 stdin_parts: [<'[a.b]\n'> <'\tc = d\n'>] ) ) ] more_env: [] do_fork: T ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 1191 stdin_parts: [<'[a.b]\n'> <'\tc = d\n'> <'[a]\n'> <'\tx = y\n'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'new section is partial match of another'>)} {(SQ <'\n'> <'\tgit config a.x y &&\n'> <'\ttest_cmp expect .git/config\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 1224 stdin_parts: [ <'[a.b]\n'> <'\tc = d\n'> <'[a]\n'> <'\tx = y\n'> <'\tb = c\n'> <'[b]\n'> <'\tx = y\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'new variable inserts into proper section'>)} { (SQ <'\n'> <'\tgit config b.x y &&\n'> <'\tgit config a.b c &&\n'> <'\ttest_cmp expect .git/config\n'> ) } ) (C {<test_expect_success>} {(SQ <'alternative --file (non-existing file should fail)'>)} {(SQ <'\n'> <'\ttest_must_fail git config --file non-existing-config -l\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<other-config>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 1265 stdin_parts: [<'[ein]\n'> <'\tbahn = strasse\n'>] ) ) ] more_env: [] do_fork: T ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 1279 stdin_parts: [<'ein.bahn=strasse\n'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'alternative GIT_CONFIG'>)} { (SQ <'\n'> <'\tGIT_CONFIG=other-config git config --list >output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'alternative GIT_CONFIG (--file)'>)} { (SQ <'\n'> <'\tgit config --file other-config --list >output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'alternative GIT_CONFIG (--file=-)'>)} { (SQ <'\n'> <'\tgit config --file - --list <other-config >output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'setting a value in stdin is an error'>)} {(SQ <'\n'> <'\ttest_must_fail git config --file - some.value foo\n'>)} ) (C {<test_expect_success>} {(SQ <'editing stdin is an error'>)} {(SQ <'\n'> <'\ttest_must_fail git config --file - --edit\n'>)} ) (C {<test_expect_success>} {(SQ <'refer config from subdirectory'>)} { (SQ <'\n'> <'\tmkdir x &&\n'> <'\t(\n'> <'\t\tcd x &&\n'> <'\t\techo strasse >expect &&\n'> <'\t\tgit config --get --file ../other-config ein.bahn >actual &&\n'> <'\t\ttest_cmp expect actual\n'> <'\t)\n'> <'\n'> ) } ) (C {<test_expect_success>} {(SQ <'refer config from subdirectory via --file'>)} { (SQ <'\n'> <'\t(\n'> <'\t\tcd x &&\n'> <'\t\tgit config --file=../other-config --get ein.bahn >actual &&\n'> <'\t\ttest_cmp expect actual\n'> <'\t)\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 1394 stdin_parts: [<'[ein]\n'> <'\tbahn = strasse\n'> <'[anwohner]\n'> <'\tpark = ausweis\n'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'--set in alternative file'>)} { (SQ <'\n'> <'\tgit config --file=other-config anwohner.park ausweis &&\n'> <'\ttest_cmp expect other-config\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'.git/config'>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 1436 stdin_parts: [ <'# Hallo\n'> <'\t#Bello\n'> <'[branch '> <Id.Right_DoubleQuote '"'> <eins> <Id.Right_DoubleQuote '"'> <']\n'> <'\tx = 1\n'> <'[branch.eins]\n'> <'\ty = 1\n'> <'\t[branch '> <Id.Right_DoubleQuote '"'> <'1 234 blabl/a'> <Id.Right_DoubleQuote '"'> <']\n'> <'weird\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'rename section'>)} {(SQ <'\n'> <'\tgit config --rename-section branch.eins branch.zwei\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 1481 stdin_parts: [ <'# Hallo\n'> <'\t#Bello\n'> <'[branch '> <Id.Right_DoubleQuote '"'> <zwei> <Id.Right_DoubleQuote '"'> <']\n'> <'\tx = 1\n'> <'[branch '> <Id.Right_DoubleQuote '"'> <zwei> <Id.Right_DoubleQuote '"'> <']\n'> <'\ty = 1\n'> <'\t[branch '> <Id.Right_DoubleQuote '"'> <'1 234 blabl/a'> <Id.Right_DoubleQuote '"'> <']\n'> <'weird\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'rename succeeded'>)} {(SQ <'\n'> <'\ttest_cmp expect .git/config\n'>)} ) (C {<test_expect_success>} {(SQ <'rename non-existing section'>)} { (SQ <'\n'> <'\ttest_must_fail git config --rename-section \\\n'> <'\t\tbranch."world domination" branch.drei\n'> ) } ) (C {<test_expect_success>} {(SQ <'rename succeeded'>)} {(SQ <'\n'> <'\ttest_cmp expect .git/config\n'>)} ) (C {<test_expect_success>} {(SQ <'rename another section'>)} {(SQ <'\n'> <'\tgit config --rename-section branch."1 234 blabl/a" branch.drei\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 1563 stdin_parts: [ <'# Hallo\n'> <'\t#Bello\n'> <'[branch '> <Id.Right_DoubleQuote '"'> <zwei> <Id.Right_DoubleQuote '"'> <']\n'> <'\tx = 1\n'> <'[branch '> <Id.Right_DoubleQuote '"'> <zwei> <Id.Right_DoubleQuote '"'> <']\n'> <'\ty = 1\n'> <'[branch '> <Id.Right_DoubleQuote '"'> <drei> <Id.Right_DoubleQuote '"'> <']\n'> <'weird\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'rename succeeded'>)} {(SQ <'\n'> <'\ttest_cmp expect .git/config\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_DGreat '>>'> loc:(redir_loc.Fd fd:1) arg:{<'.git/config'>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 1593 stdin_parts: [ <'[branch '> <Id.Right_DoubleQuote '"'> <vier> <Id.Right_DoubleQuote '"'> <'] z = 1\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'rename a section with a var on the same line'>)} {(SQ <'\n'> <'\tgit config --rename-section branch.vier branch.zwei\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 1644 stdin_parts: [ <'# Hallo\n'> <'\t#Bello\n'> <'[branch '> <Id.Right_DoubleQuote '"'> <zwei> <Id.Right_DoubleQuote '"'> <']\n'> <'\tx = 1\n'> <'[branch '> <Id.Right_DoubleQuote '"'> <zwei> <Id.Right_DoubleQuote '"'> <']\n'> <'\ty = 1\n'> <'[branch '> <Id.Right_DoubleQuote '"'> <drei> <Id.Right_DoubleQuote '"'> <']\n'> <'weird\n'> <'[branch '> <Id.Right_DoubleQuote '"'> <zwei> <Id.Right_DoubleQuote '"'> <']\n'> <'\tz = 1\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'rename succeeded'>)} {(SQ <'\n'> <'\ttest_cmp expect .git/config\n'>)} ) (C {<test_expect_success>} {(SQ <'renaming empty section name is rejected'>)} {(SQ <'\n'> <'\ttest_must_fail git config --rename-section branch.zwei ""\n'>)} ) (C {<test_expect_success>} {(SQ <'renaming to bogus section is rejected'>)} {(SQ <'\n'> <'\ttest_must_fail git config --rename-section branch.zwei "bogus name"\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_DGreat '>>'> loc:(redir_loc.Fd fd:1) arg:{<'.git/config'>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 1702 stdin_parts: [ <' [branch '> <Id.Right_DoubleQuote '"'> <zwei> <Id.Right_DoubleQuote '"'> <'] a = 1 [branch '> <Id.Right_DoubleQuote '"'> <vier> <Id.Right_DoubleQuote '"'> <']\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'remove section'>)} {(SQ <'\n'> <'\tgit config --remove-section branch.zwei\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 1735 stdin_parts: [ <'# Hallo\n'> <'\t#Bello\n'> <'[branch '> <Id.Right_DoubleQuote '"'> <drei> <Id.Right_DoubleQuote '"'> <']\n'> <'weird\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'section was removed properly'>)} {(SQ <'\n'> <'\ttest_cmp expect .git/config\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 1769 stdin_parts: [ <'[gitcvs]\n'> <'\tenabled = true\n'> <'\tdbname = %Ggitcvs2.%a.%m.sqlite\n'> <'[gitcvs '> <Id.Right_DoubleQuote '"'> <ext> <Id.Right_DoubleQuote '"'> <']\n'> <'\tdbname = %Ggitcvs1.%a.%m.sqlite\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'section ending'>)} { (SQ <'\n'> <'\trm -f .git/config &&\n'> <'\tgit config gitcvs.enabled true &&\n'> <'\tgit config gitcvs.ext.dbname %Ggitcvs1.%a.%m.sqlite &&\n'> <'\tgit config gitcvs.dbname %Ggitcvs2.%a.%m.sqlite &&\n'> <'\ttest_cmp expect .git/config\n'> <'\n'> ) } ) (C {<test_expect_success>} {<numbers>} { (SQ <'\n'> <'\tgit config kilo.gram 1k &&\n'> <'\tgit config mega.ton 1m &&\n'> <'\techo 1024 >expect &&\n'> <'\techo 1048576 >>expect &&\n'> <'\tgit config --int --get kilo.gram >actual &&\n'> <'\tgit config --int --get mega.ton >>actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'--int is at least 64 bits'>)} { (SQ <'\n'> <'\tgit config giga.watts 121g &&\n'> <'\techo 129922760704 >expect &&\n'> <'\tgit config --int --get giga.watts >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'invalid unit'>)} { (SQ <'\n'> <'\tgit config aninvalid.unit "1auto" &&\n'> <'\techo 1auto >expect &&\n'> <'\tgit config aninvalid.unit >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\ttest_must_fail git config --int --get aninvalid.unit 2>actual &&\n'> < '\ttest_i18ngrep "bad numeric config value .1auto. for .aninvalid.unit. in file .git/config: invalid unit" actual\n' > ) } ) (C {<test_expect_success>} {(SQ <'invalid stdin config'>)} { (SQ <'\n'> <'\techo "[broken" | test_must_fail git config --list --file - >output 2>&1 &&\n'> <'\ttest_i18ngrep "bad config line 1 in standard input" output\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 1868 stdin_parts: [ <'true\n'> <'false\n'> <'true\n'> <'false\n'> <'true\n'> <'false\n'> <'true\n'> <'false\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {<bool>} { (SQ <'\n'> <'\n'> <'\tgit config bool.true1 01 &&\n'> <'\tgit config bool.true2 -1 &&\n'> <'\tgit config bool.true3 YeS &&\n'> <'\tgit config bool.true4 true &&\n'> <'\tgit config bool.false1 000 &&\n'> <'\tgit config bool.false2 "" &&\n'> <'\tgit config bool.false3 nO &&\n'> <'\tgit config bool.false4 FALSE &&\n'> <'\trm -f result &&\n'> <'\tfor i in 1 2 3 4\n'> <'\tdo\n'> <'\t git config --bool --get bool.true$i >>result\n'> <'\t git config --bool --get bool.false$i >>result\n'> <' done &&\n'> <'\ttest_cmp expect result'> ) } ) (C {<test_expect_success>} {(SQ <'invalid bool (--get)'>)} { (SQ <'\n'> <'\n'> <'\tgit config bool.nobool foobar &&\n'> <'\ttest_must_fail git config --bool --get bool.nobool'> ) } ) (C {<test_expect_success>} {(SQ <'invalid bool (set)'>)} {(SQ <'\n'> <'\n'> <'\ttest_must_fail git config --bool bool.nobool foobar'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>} here_end_span_id: 1941 stdin_parts: [ <'[bool]\n'> <'\ttrue1 = true\n'> <'\ttrue2 = true\n'> <'\ttrue3 = true\n'> <'\ttrue4 = true\n'> <'\tfalse1 = false\n'> <'\tfalse2 = false\n'> <'\tfalse3 = false\n'> <'\tfalse4 = false\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'set --bool'>)} { (SQ <'\n'> <'\n'> <'\trm -f .git/config &&\n'> <'\tgit config --bool bool.true1 01 &&\n'> <'\tgit config --bool bool.true2 -1 &&\n'> <'\tgit config --bool bool.true3 YeS &&\n'> <'\tgit config --bool bool.true4 true &&\n'> <'\tgit config --bool bool.false1 000 &&\n'> <'\tgit config --bool bool.false2 "" &&\n'> <'\tgit config --bool bool.false3 nO &&\n'> <'\tgit config --bool bool.false4 FALSE &&\n'> <'\ttest_cmp expect .git/config'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>} here_end_span_id: 1979 stdin_parts: [<'[int]\n'> <'\tval1 = 1\n'> <'\tval2 = -1\n'> <'\tval3 = 5242880\n'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'set --int'>)} { (SQ <'\n'> <'\n'> <'\trm -f .git/config &&\n'> <'\tgit config --int int.val1 01 &&\n'> <'\tgit config --int int.val2 -1 &&\n'> <'\tgit config --int int.val3 5m &&\n'> <'\ttest_cmp expect .git/config\n'> ) } ) (C {<test_expect_success>} {(SQ <'get --bool-or-int'>)} { (SQ <'\n'> <'\tcat >.git/config <<-\\EOF &&\n'> <'\t[bool]\n'> <'\ttrue1\n'> <'\ttrue2 = true\n'> <'\tfalse = false\n'> <'\t[int]\n'> <'\tint1 = 0\n'> <'\tint2 = 1\n'> <'\tint3 = -1\n'> <'\tEOF\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\ttrue\n'> <'\ttrue\n'> <'\tfalse\n'> <'\t0\n'> <'\t1\n'> <'\t-1\n'> <'\tEOF\n'> <'\t{\n'> <'\t\tgit config --bool-or-int bool.true1 &&\n'> <'\t\tgit config --bool-or-int bool.true2 &&\n'> <'\t\tgit config --bool-or-int bool.false &&\n'> <'\t\tgit config --bool-or-int int.int1 &&\n'> <'\t\tgit config --bool-or-int int.int2 &&\n'> <'\t\tgit config --bool-or-int int.int3\n'> <'\t} >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>} here_end_span_id: 2054 stdin_parts: [ <'[bool]\n'> <'\ttrue1 = true\n'> <'\tfalse1 = false\n'> <'\ttrue2 = true\n'> <'\tfalse2 = false\n'> <'[int]\n'> <'\tint1 = 0\n'> <'\tint2 = 1\n'> <'\tint3 = -1\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'set --bool-or-int'>)} { (SQ <'\n'> <'\trm -f .git/config &&\n'> <'\tgit config --bool-or-int bool.true1 true &&\n'> <'\tgit config --bool-or-int bool.false1 false &&\n'> <'\tgit config --bool-or-int bool.true2 yes &&\n'> <'\tgit config --bool-or-int bool.false2 no &&\n'> <'\tgit config --bool-or-int int.int1 0 &&\n'> <'\tgit config --bool-or-int int.int2 1 &&\n'> <'\tgit config --bool-or-int int.int3 -1 &&\n'> <'\ttest_cmp expect .git/config\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>} here_end_span_id: 2089 stdin_parts: [ <'[path]\n'> <'\thome = ~/\n'> <'\tnormal = /dev/null\n'> <'\ttrailingtilde = foo~\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {<Id.KW_Bang '!'> <MINGW>} {(SQ <'set --path'>)} { (SQ <'\n'> <'\trm -f .git/config &&\n'> <'\tgit config --path path.home "~/" &&\n'> <'\tgit config --path path.normal "/dev/null" &&\n'> <'\tgit config --path path.trailingtilde "foo~" &&\n'> <'\ttest_cmp expect .git/config'> ) } ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<test_have_prereq>} {<Id.KW_Bang '!'> <MINGW>}) (C {<test>} { (DQ (braced_var_sub left: <Id.Left_DollarBrace '${'> token: <Id.VSub_Name HOME> var_name: HOME suffix_op: (suffix_op.Unary op:<Id.VTest_Plus _> arg_word:{<set>}) right: <Id.Right_DollarBrace '}'> ) ) } ) ] ) ] ) action: [(C {<test_set_prereq>} {<HOMEVAR>})] spids: [2110 2129] ) ] else_action: [] redirects: [] ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 2152 stdin_parts: [($ Id.VSub_DollarName HOME) <'/\n'> <'/dev/null\n'> <'foo~\n'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {<HOMEVAR>} {(SQ <'get --path'>)} { (SQ <'\n'> <'\tgit config --get --path path.home > result &&\n'> <'\tgit config --get --path path.normal >> result &&\n'> <'\tgit config --get --path path.trailingtilde >> result &&\n'> <'\ttest_cmp expect result\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>} here_end_span_id: 2182 stdin_parts: [<'/dev/null\n'> <'foo~\n'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {<Id.KW_Bang '!'> <MINGW>} {(SQ <'get --path copes with unset $HOME'>)} { (SQ <'\n'> <'\t(\n'> <'\t\tunset HOME;\n'> <'\t\ttest_must_fail git config --get --path path.home \\\n'> <'\t\t\t>result 2>msg &&\n'> <'\t\tgit config --get --path path.normal >>result &&\n'> <'\t\tgit config --get --path path.trailingtilde >>result\n'> <'\t) &&\n'> <'\ttest_i18ngrep "[Ff]ailed to expand.*~/" msg &&\n'> <'\ttest_cmp expect result\n'> ) } ) (C {<test_expect_success>} {(SQ <'get --path barfs on boolean variable'>)} { (SQ <'\n'> <'\techo "[path]bool" >.git/config &&\n'> <'\ttest_must_fail git config --get --path path.bool\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 2252 stdin_parts: [ <'[quote]\n'> <'\tleading = '> <Id.Right_DoubleQuote '"'> <' test'> <Id.Right_DoubleQuote '"'> <'\n'> <'\tending = '> <Id.Right_DoubleQuote '"'> <'test '> <Id.Right_DoubleQuote '"'> <'\n'> <'\tsemicolon = '> <Id.Right_DoubleQuote '"'> <'test;test'> <Id.Right_DoubleQuote '"'> <'\n'> <'\thash = '> <Id.Right_DoubleQuote '"'> <'test#test'> <Id.Right_DoubleQuote '"'> <'\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <quoting>)} { (SQ <'\n'> <'\trm -f .git/config &&\n'> <'\tgit config quote.leading " test" &&\n'> <'\tgit config quote.ending "test " &&\n'> <'\tgit config quote.semicolon "test;test" &&\n'> <'\tgit config quote.hash "test#test" &&\n'> <'\ttest_cmp expect .git/config\n'> ) } ) (C {<test_expect_success>} {(SQ <'key with newline'>)} {(SQ <'\n'> <'\ttest_must_fail git config "key.with\n'> <'newline" 123'>)} ) (C {<test_expect_success>} {(SQ <'value with newline'>)} {(SQ <'git config key.sub value.with\\\\\\\n'> <newline>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'.git/config'>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>} here_end_span_id: 2312 stdin_parts: [ <'[section]\n'> <'\t; comment \\\n'> <'\tcontinued = cont\\\n'> <'inued\n'> <'\tnoncont = not continued ; \\\n'> <'\tquotecont = "cont;\\\n'> <'inued"\n'> ] ) ) ] more_env: [] do_fork: T ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>} here_end_span_id: 2327 stdin_parts: [ <'section.continued=continued\n'> <'section.noncont=not continued\n'> <'section.quotecont=cont;inued\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'value continued on next line'>)} {(SQ <'\n'> <'\tgit config --list > result &&\n'> <'\ttest_cmp result expect\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'.git/config'>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>} here_end_span_id: 2358 stdin_parts: [ <'[section "sub=section"]\n'> <'\tval1 = foo=bar\n'> <'\tval2 = foo\\nbar\n'> <'\tval3 = \\n\\n\n'> <'\tval4 =\n'> <'\tval5\n'> ] ) ) ] more_env: [] do_fork: T ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'> ch:E) <OF>} here_end_span_id: 2378 stdin_parts: [ <'section.sub=section.val1\n'> <'foo=barQsection.sub=section.val2\n'> <'foo\n'> <'barQsection.sub=section.val3\n'> <'\n'> <'\n'> <'Qsection.sub=section.val4\n'> <'Qsection.sub=section.val5Q\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'--null --list'>)} { (SQ <'\n'> <'\tgit config --null --list >result.raw &&\n'> <'\tnul_to_q <result.raw >result &&\n'> <'\techo >>result &&\n'> <'\ttest_cmp expect result\n'> ) } ) (C {<test_expect_success>} {(SQ <'--null --get-regexp'>)} { (SQ <'\n'> <'\tgit config --null --get-regexp "val[0-9]" >result.raw &&\n'> <'\tnul_to_q <result.raw >result &&\n'> <'\techo >>result &&\n'> <'\ttest_cmp expect result\n'> ) } ) (C {<test_expect_success>} {(SQ <'inner whitespace kept verbatim'>)} { (SQ <'\n'> <'\tgit config section.val "foo \t bar" &&\n'> <'\techo "foo \t bar" >expect &&\n'> <'\tgit config section.val >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {<SYMLINKS>} {(SQ <'symlinked configuration'>)} { (SQ <'\n'> <'\tln -s notyet myconfig &&\n'> <'\tgit config --file=myconfig test.frotz nitfol &&\n'> <'\ttest -h myconfig &&\n'> <'\ttest -f notyet &&\n'> <'\ttest "z$(git config --file=notyet test.frotz)" = znitfol &&\n'> <'\tgit config --file=myconfig test.xyzzy rezrov &&\n'> <'\ttest -h myconfig &&\n'> <'\ttest -f notyet &&\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\tnitfol\n'> <'\trezrov\n'> <'\tEOF\n'> <'\t{\n'> <'\t\tgit config --file=notyet test.frotz &&\n'> <'\t\tgit config --file=notyet test.xyzzy\n'> <'\t} >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'nonexistent configuration'>)} { (SQ <'\n'> <'\ttest_must_fail git config --file=doesnotexist --list &&\n'> <'\ttest_must_fail git config --file=doesnotexist test.xyzzy\n'> ) } ) (C {<test_expect_success>} {<SYMLINKS>} {(SQ <'symlink to nonexistent configuration'>)} { (SQ <'\n'> <'\tln -s doesnotexist linktonada &&\n'> <'\tln -s linktonada linktolinktonada &&\n'> <'\ttest_must_fail git config --file=linktonada --list &&\n'> <'\ttest_must_fail git config --file=linktolinktonada --list\n'> ) } ) (C {<test_expect_success>} {(SQ <'check split_cmdline return'>)} { (DQ <'\n'> <'\tgit config alias.split-cmdline-fix \'echo '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') <'\' &&\n'> <'\ttest_must_fail git split-cmdline-fix &&\n'> <'\techo foo > foo &&\n'> <'\tgit add foo &&\n'> <'\tgit commit -m \'initial commit\' &&\n'> <'\tgit config branch.master.mergeoptions \'echo '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'> ch:'"') <'\' &&\n'> <'\ttest_must_fail git merge master\n'> ) } ) (C {<test_expect_success>} {(SQ <'git -c "key=value" support'>)} { (SQ <'\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\tvalue\n'> <'\tvalue\n'> <'\ttrue\n'> <'\tEOF\n'> <'\t{\n'> <'\t\tgit -c core.name=value config core.name &&\n'> <'\t\tgit -c foo.CamelCase=value config foo.camelcase &&\n'> <'\t\tgit -c foo.flag config --bool foo.flag\n'> <'\t} >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\ttest_must_fail git -c name=value config core.name\n'> ) } ) (C {<test_expect_success>} {(SQ <'git -c can represent empty string'>)} { (SQ <'\n'> <'\techo >expect &&\n'> <'\tgit -c foo.empty= config --path foo.empty >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'key sanity-checking'>)} { (SQ <'\n'> <'\ttest_must_fail git config foo=bar &&\n'> <'\ttest_must_fail git config foo=.bar &&\n'> <'\ttest_must_fail git config foo.ba=r &&\n'> <'\ttest_must_fail git config foo.1bar &&\n'> <'\ttest_must_fail git config foo."ba\n'> <'\t\t\t\tz".bar &&\n'> <'\ttest_must_fail git config . false &&\n'> <'\ttest_must_fail git config .foo false &&\n'> <'\ttest_must_fail git config foo. false &&\n'> <'\ttest_must_fail git config .foo. false &&\n'> <'\tgit config foo.bar true &&\n'> <'\tgit config foo."ba =z".bar false\n'> ) } ) (C {<test_expect_success>} {(SQ <'git -c works with aliases of builtins'>)} { (SQ <'\n'> <'\tgit config alias.checkconfig "-c foo.check=bar config foo.check" &&\n'> <'\techo bar >expect &&\n'> <'\tgit checkconfig >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'git -c does not split values on equals'>)} { (SQ <'\n'> <'\techo "value with = in it" >expect &&\n'> <'\tgit -c core.foo="value with = in it" config core.foo >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'git -c dies on bogus config'>)} {(SQ <'\n'> <'\ttest_must_fail git -c core.bare=foo rev-parse\n'>)} ) (C {<test_expect_success>} {(SQ <'git -c complains about empty key'>)} {(SQ <'\n'> <'\ttest_must_fail git -c "=foo" rev-parse\n'>)} ) (C {<test_expect_success>} {(SQ <'git -c complains about empty key and value'>)} {(SQ <'\n'> <'\ttest_must_fail git -c "" rev-parse\n'>)} ) (C {<test_expect_success>} {(SQ <'multiple git -c appends config'>)} { (SQ <'\n'> <'\ttest_config alias.x "!git -c x.two=2 config --get-regexp ^x\\.*" &&\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\tx.one 1\n'> <'\tx.two 2\n'> <'\tEOF\n'> <'\tgit -c x.one=1 x >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'git -c is not confused by empty environment'>)} {(SQ <'\n'> <'\tGIT_CONFIG_PARAMETERS="" git -c x.one=1 config --list\n'>)} ) (C {<test_expect_success>} {(SQ <'git config --edit works'>)} { (SQ <'\n'> <'\tgit config -f tmp test.value no &&\n'> <'\techo test.value=yes >expect &&\n'> <'\tGIT_EDITOR="echo [test]value=yes >" git config -f tmp --edit &&\n'> <'\tgit config -f tmp --list >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'git config --edit respects core.editor'>)} { (SQ <'\n'> <'\tgit config -f tmp test.value no &&\n'> <'\techo test.value=yes >expect &&\n'> <'\ttest_config core.editor "echo [test]value=yes >" &&\n'> <'\tgit config -f tmp --edit &&\n'> <'\tgit config -f tmp --list >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'barf on syntax error'>)} { (SQ <'\n'> <'\tcat >.git/config <<-\\EOF &&\n'> <'\t# broken section line\n'> <'\t[section]\n'> <'\tkey garbage\n'> <'\tEOF\n'> <'\ttest_must_fail git config --get section.key >actual 2>error &&\n'> <'\ttest_i18ngrep " line 3 " error\n'> ) } ) (C {<test_expect_success>} {(SQ <'barf on incomplete section header'>)} { (SQ <'\n'> <'\tcat >.git/config <<-\\EOF &&\n'> <'\t# broken section line\n'> <'\t[section\n'> <'\tkey = value\n'> <'\tEOF\n'> <'\ttest_must_fail git config --get section.key >actual 2>error &&\n'> <'\ttest_i18ngrep " line 2 " error\n'> ) } ) (C {<test_expect_success>} {(SQ <'barf on incomplete string'>)} { (SQ <'\n'> <'\tcat >.git/config <<-\\EOF &&\n'> <'\t# broken section line\n'> <'\t[section]\n'> <'\tkey = "value string\n'> <'\tEOF\n'> <'\ttest_must_fail git config --get section.key >actual 2>error &&\n'> <'\ttest_i18ngrep " line 3 " error\n'> ) } ) (C {<test_expect_success>} {(SQ <urlmatch>)} { (SQ <'\n'> <'\tcat >.git/config <<-\\EOF &&\n'> <'\t[http]\n'> <'\t\tsslVerify\n'> <'\t[http "https://weak.example.com"]\n'> <'\t\tsslVerify = false\n'> <'\t\tcookieFile = /tmp/cookie.txt\n'> <'\tEOF\n'> <'\n'> < '\ttest_expect_code 1 git config --bool --get-urlmatch doesnt.exist https://good.example.com >actual &&\n' > <'\ttest_must_be_empty actual &&\n'> <'\n'> <'\techo true >expect &&\n'> < '\tgit config --bool --get-urlmatch http.SSLverify https://good.example.com >actual &&\n' > <'\ttest_cmp expect actual &&\n'> <'\n'> <'\techo false >expect &&\n'> < '\tgit config --bool --get-urlmatch http.sslverify https://weak.example.com >actual &&\n' > <'\ttest_cmp expect actual &&\n'> <'\n'> <'\t{\n'> <'\t\techo http.cookiefile /tmp/cookie.txt &&\n'> <'\t\techo http.sslverify false\n'> <'\t} >expect &&\n'> <'\tgit config --get-urlmatch HTTP https://weak.example.com >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_failure>} {(SQ <'unsetting the last key in a section removes header'>)} { (SQ <'\n'> <'\tcat >.git/config <<-\\EOF &&\n'> <'\t# some generic comment on the configuration file itself\n'> <'\t# a comment specific to this "section" section.\n'> <'\t[section]\n'> <'\t# some intervening lines\n'> <'\t# that should also be dropped\n'> <'\n'> <'\tkey = value\n'> <'\t# please be careful when you update the above variable\n'> <'\tEOF\n'> <'\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\t# some generic comment on the configuration file itself\n'> <'\tEOF\n'> <'\n'> <'\tgit config --unset section.key &&\n'> <'\ttest_cmp expect .git/config\n'> ) } ) (C {<test_expect_failure>} {(SQ <'adding a key into an empty section reuses header'>)} { (SQ <'\n'> <'\tcat >.git/config <<-\\EOF &&\n'> <'\t[section]\n'> <'\tEOF\n'> <'\n'> <'\tq_to_tab >expect <<-\\EOF &&\n'> <'\t[section]\n'> <'\tQkey = value\n'> <'\tEOF\n'> <'\n'> <'\tgit config section.key value &&\n'> <'\ttest_cmp expect .git/config\n'> ) } ) (C {<test_expect_success>} {<POSIXPERM> <Id.Lit_Comma ','> <PERL>} {(SQ <'preserves existing permissions'>)} { (SQ <'\n'> <'\tchmod 0600 .git/config &&\n'> <'\tgit config imap.pass Hunter2 &&\n'> <'\tperl -e \\\n'> <'\t "die q(badset) if ((stat(q(.git/config)))[2] & 07777) != 0600" &&\n'> <'\tgit config --rename-section imap pop &&\n'> <'\tperl -e \\\n'> <'\t "die q(badrename) if ((stat(q(.git/config)))[2] & 07777) != 0600"\n'> ) } ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Pipeline children: [(C {<test_have_prereq>} {<MINGW>})] negated: T stderr_indices: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'HOME='> name:HOME) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<pwd>}) right: <Id.Eof_RParen _> ) ) } spids: [2885] ) ] redirects: [] ) ] ) (C {<test_expect_success>} {(SQ <'set up --show-origin tests'>)} { (SQ <'\n'> <'\tINCLUDE_DIR="$HOME/include" &&\n'> <'\tmkdir -p "$INCLUDE_DIR" &&\n'> <'\tcat >"$INCLUDE_DIR"/absolute.include <<-\\EOF &&\n'> <'\t\t[user]\n'> <'\t\t\tabsolute = include\n'> <'\tEOF\n'> <'\tcat >"$INCLUDE_DIR"/relative.include <<-\\EOF &&\n'> <'\t\t[user]\n'> <'\t\t\trelative = include\n'> <'\tEOF\n'> <'\tcat >"$HOME"/.gitconfig <<-EOF &&\n'> <'\t\t[user]\n'> <'\t\t\tglobal = true\n'> <'\t\t\toverride = global\n'> <'\t\t[include]\n'> <'\t\t\tpath = "$INCLUDE_DIR/absolute.include"\n'> <'\tEOF\n'> <'\tcat >.git/config <<-\\EOF\n'> <'\t\t[user]\n'> <'\t\t\tlocal = true\n'> <'\t\t\toverride = local\n'> <'\t\t[include]\n'> <'\t\t\tpath = ../include/relative.include\n'> <'\tEOF\n'> ) } ) (C {<test_expect_success>} {(SQ <'--show-origin with --list'>)} { (SQ <'\n'> <'\tcat >expect <<-EOF &&\n'> <'\t\tfile:$HOME/.gitconfig\tuser.global=true\n'> <'\t\tfile:$HOME/.gitconfig\tuser.override=global\n'> <'\t\tfile:$HOME/.gitconfig\tinclude.path=$INCLUDE_DIR/absolute.include\n'> <'\t\tfile:$INCLUDE_DIR/absolute.include\tuser.absolute=include\n'> <'\t\tfile:.git/config\tuser.local=true\n'> <'\t\tfile:.git/config\tuser.override=local\n'> <'\t\tfile:.git/config\tinclude.path=../include/relative.include\n'> <'\t\tfile:.git/../include/relative.include\tuser.relative=include\n'> <'\t\tcommand line:\tuser.cmdline=true\n'> <'\tEOF\n'> <'\tgit -c user.cmdline=true config --list --show-origin >output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'--show-origin with --list --null'>)} { (SQ <'\n'> <'\tcat >expect <<-EOF &&\n'> <'\t\tfile:$HOME/.gitconfigQuser.global\n'> <'\t\ttrueQfile:$HOME/.gitconfigQuser.override\n'> <'\t\tglobalQfile:$HOME/.gitconfigQinclude.path\n'> <'\t\t$INCLUDE_DIR/absolute.includeQfile:$INCLUDE_DIR/absolute.includeQuser.absolute\n'> <'\t\tincludeQfile:.git/configQuser.local\n'> <'\t\ttrueQfile:.git/configQuser.override\n'> <'\t\tlocalQfile:.git/configQinclude.path\n'> <'\t\t../include/relative.includeQfile:.git/../include/relative.includeQuser.relative\n'> <'\t\tincludeQcommand line:Quser.cmdline\n'> <'\t\ttrueQ\n'> <'\tEOF\n'> <'\tgit -c user.cmdline=true config --null --list --show-origin >output.raw &&\n'> <'\tnul_to_q <output.raw >output &&\n'> <'\t# The here-doc above adds a newline that the --null output would not\n'> <'\t# include. Add it here to make the two comparable.\n'> <'\techo >>output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'--show-origin with single file'>)} { (SQ <'\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\t\tfile:.git/config\tuser.local=true\n'> <'\t\tfile:.git/config\tuser.override=local\n'> <'\t\tfile:.git/config\tinclude.path=../include/relative.include\n'> <'\tEOF\n'> <'\tgit config --local --list --show-origin >output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'--show-origin with --get-regexp'>)} { (SQ <'\n'> <'\tcat >expect <<-EOF &&\n'> <'\t\tfile:$HOME/.gitconfig\tuser.global true\n'> <'\t\tfile:.git/config\tuser.local true\n'> <'\tEOF\n'> <'\tgit config --show-origin --get-regexp "user\\.[g|l].*" >output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'--show-origin getting a single key'>)} { (SQ <'\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\t\tfile:.git/config\tlocal\n'> <'\tEOF\n'> <'\tgit config --show-origin user.override >output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'set up custom config file'>)} { (SQ <'\n'> <'\tCUSTOM_CONFIG_FILE="file\\" (dq) and spaces.conf" &&\n'> <'\tcat >"$CUSTOM_CONFIG_FILE" <<-\\EOF\n'> <'\t\t[user]\n'> <'\t\t\tcustom = true\n'> <'\tEOF\n'> ) } ) (C {<test_expect_success>} {<Id.KW_Bang '!'> <MINGW>} {(SQ <'--show-origin escape special file name characters'>)} { (SQ <'\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\t\tfile:"file\\" (dq) and spaces.conf"\tuser.custom=true\n'> <'\tEOF\n'> <'\tgit config --file "$CUSTOM_CONFIG_FILE" --show-origin --list >output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'--show-origin stdin'>)} { (SQ <'\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\t\tstandard input:\tuser.custom=true\n'> <'\tEOF\n'> <'\tgit config --file - --show-origin --list <"$CUSTOM_CONFIG_FILE" >output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'--show-origin stdin with file include'>)} { (SQ <'\n'> <'\tcat >"$INCLUDE_DIR"/stdin.include <<-EOF &&\n'> <'\t\t[user]\n'> <'\t\t\tstdin = include\n'> <'\tEOF\n'> <'\tcat >expect <<-EOF &&\n'> <'\t\tfile:$INCLUDE_DIR/stdin.include\tinclude\n'> <'\tEOF\n'> <'\techo "[include]path=\\"$INCLUDE_DIR\\"/stdin.include" \\\n'> <'\t\t| git config --show-origin --includes --file - user.stdin >output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_expect_success>} {<Id.KW_Bang '!'> <MINGW>} {(SQ <'--show-origin blob'>)} { (SQ <'\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\t\tblob:a9d9f9e555b5c6f07cbe09d3f06fe3df11e09c08\tuser.custom=true\n'> <'\tEOF\n'> <'\tblob=$(git hash-object -w "$CUSTOM_CONFIG_FILE") &&\n'> <'\tgit config --blob=$blob --show-origin --list >output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_expect_success>} {<Id.KW_Bang '!'> <MINGW>} {(SQ <'--show-origin blob ref'>)} { (SQ <'\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\t\tblob:"master:file\\" (dq) and spaces.conf"\tuser.custom=true\n'> <'\tEOF\n'> <'\tgit add "$CUSTOM_CONFIG_FILE" &&\n'> <'\tgit commit -m "new config file" &&\n'> <'\tgit config --blob=master:"$CUSTOM_CONFIG_FILE" --show-origin --list >output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_done>}) ] )