(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ (Token id:Id.Lit_Chars val:'git branch assorted tests' span_id:15))} spids: [13] ) ] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'prepare a trivial repository' span_id:27))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:31) (Token id:Id.Lit_Chars val:'\techo Hello >A &&\n' span_id:32) (Token id:Id.Lit_Chars val:'\tgit update-index --add A &&\n' span_id:33) (Token id:Id.Lit_Chars val:'\tgit commit -m "Initial commit." &&\n' span_id:34) (Token id:Id.Lit_Chars val:'\techo World >>A &&\n' span_id:35) (Token id:Id.Lit_Chars val:'\tgit update-index --add A &&\n' span_id:36) (Token id:Id.Lit_Chars val:'\tgit commit -m "Second commit." &&\n' span_id:37) (Token id:Id.Lit_Chars val:'\tHEAD=$(git rev-parse --verify HEAD)\n' span_id:38) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'git branch --help should not have created a bogus branch' span_id: 45 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:49) (Token id: Id.Lit_Chars val: '\ttest_might_fail git branch --man --help </dev/null >/dev/null 2>&1 &&\n' span_id: 50 ) (Token id:Id.Lit_Chars val:'\ttest_path_is_missing .git/refs/heads/--help\n' span_id:51) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'branch -h in broken repository' span_id:58))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:62) (Token id:Id.Lit_Chars val:'\tmkdir broken &&\n' span_id:63) (Token id:Id.Lit_Chars val:'\t(\n' span_id:64) (Token id:Id.Lit_Chars val:'\t\tcd broken &&\n' span_id:65) (Token id:Id.Lit_Chars val:'\t\tgit init &&\n' span_id:66) (Token id:Id.Lit_Chars val:'\t\t>.git/refs/heads/master &&\n' span_id:67) (Token id:Id.Lit_Chars val:'\t\ttest_expect_code 129 git branch -h >usage 2>&1\n' span_id:68) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:69) (Token id:Id.Lit_Chars val:'\ttest_i18ngrep "[Uu]sage" broken/usage\n' span_id:70) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git branch abc should create a branch' span_id:77))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:81) (Token id: Id.Lit_Chars val: '\tgit branch abc && test_path_is_file .git/refs/heads/abc\n' span_id: 82 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git branch a/b/c should create a branch' span_id:89))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:93) (Token id: Id.Lit_Chars val: '\tgit branch a/b/c && test_path_is_file .git/refs/heads/a/b/c\n' span_id: 94 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git branch HEAD should fail' span_id:101))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:105) (Token id:Id.Lit_Chars val:'\ttest_must_fail git branch HEAD\n' span_id:106) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:112) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:115) fd: -1 here_begin: {(EOF)} here_end_span_id: 127 stdin_parts: [ ($ Id.VSub_DollarName '$_z40') (' ') ($ Id.VSub_DollarName '$HEAD') (' ') ($ Id.VSub_DollarName '$GIT_COMMITTER_NAME') (' <') ($ Id.VSub_DollarName '$GIT_COMMITTER_EMAIL') ('> 1117150200 +0000\tbranch: Created from master\n') ] ) ] ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'git branch -l d/e/f should create a branch and a log' span_id: 131 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:135) (Token id: Id.Lit_Chars val: '\tGIT_COMMITTER_DATE="2005-05-26 23:30" \\\n' span_id: 136 ) (Token id:Id.Lit_Chars val:'\tgit branch -l d/e/f &&\n' span_id:137) (Token id: Id.Lit_Chars val: '\ttest_path_is_file .git/refs/heads/d/e/f &&\n' span_id: 138 ) (Token id:Id.Lit_Chars val:'\ttest_path_is_file .git/logs/refs/heads/d/e/f &&\n' span_id:139) (Token id: Id.Lit_Chars val: '\ttest_cmp expect .git/logs/refs/heads/d/e/f\n' span_id: 140 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'git branch -d d/e/f should delete a branch and a log' span_id: 147 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:151) (Token id:Id.Lit_Chars val:'\tgit branch -d d/e/f &&\n' span_id:152) (Token id:Id.Lit_Chars val:'\ttest_path_is_missing .git/refs/heads/d/e/f &&\n' span_id:153) (Token id: Id.Lit_Chars val: '\ttest_must_fail git reflog exists refs/heads/d/e/f\n' span_id: 154 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'git branch j/k should work after branch j has been deleted' span_id: 161 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:165) (Token id:Id.Lit_Chars val:'\tgit branch j &&\n' span_id:166) (Token id:Id.Lit_Chars val:'\tgit branch -d j &&\n' span_id:167) (Token id:Id.Lit_Chars val:'\tgit branch j/k\n' span_id:168) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'git branch l should work after branch l/m has been deleted' span_id: 175 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:179) (Token id:Id.Lit_Chars val:'\tgit branch l/m &&\n' span_id:180) (Token id:Id.Lit_Chars val:'\tgit branch -d l/m &&\n' span_id:181) (Token id:Id.Lit_Chars val:'\tgit branch l\n' span_id:182) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git branch -m dumps usage' span_id:189))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:193) (Token id: Id.Lit_Chars val: '\ttest_expect_code 128 git branch -m 2>err &&\n' span_id: 194 ) (Token id:Id.Lit_Chars val:'\ttest_i18ngrep "branch name required" err\n' span_id:195) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git branch -m m broken_symref should work' span_id:202))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:206) (Token id: Id.Lit_Chars val: '\ttest_when_finished "git branch -D broken_symref" &&\n' span_id: 207 ) (Token id:Id.Lit_Chars val:'\tgit branch -l m &&\n' span_id:208) (Token id: Id.Lit_Chars val: '\tgit symbolic-ref refs/heads/broken_symref refs/heads/i_am_broken &&\n' span_id: 209 ) (Token id:Id.Lit_Chars val:'\tgit branch -m m broken_symref &&\n' span_id:210) (Token id: Id.Lit_Chars val: '\tgit reflog exists refs/heads/broken_symref &&\n' span_id: 211 ) (Token id:Id.Lit_Chars val:'\ttest_must_fail git reflog exists refs/heads/i_am_broken\n' span_id:212) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git branch -m m m/m should work' span_id:219))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:223) (Token id:Id.Lit_Chars val:'\tgit branch -l m &&\n' span_id:224) (Token id:Id.Lit_Chars val:'\tgit branch -m m m/m &&\n' span_id:225) (Token id:Id.Lit_Chars val:'\tgit reflog exists refs/heads/m/m\n' span_id:226) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git branch -m n/n n should work' span_id:233))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:237) (Token id:Id.Lit_Chars val:'\tgit branch -l n/n &&\n' span_id:238) (Token id:Id.Lit_Chars val:'\tgit branch -m n/n n &&\n' span_id:239) (Token id:Id.Lit_Chars val:'\tgit reflog exists refs/heads/n\n' span_id:240) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git branch -m o/o o should fail when o/p exists' span_id:247))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:251) (Token id:Id.Lit_Chars val:'\tgit branch o/o &&\n' span_id:252) (Token id:Id.Lit_Chars val:'\tgit branch o/p &&\n' span_id:253) (Token id:Id.Lit_Chars val:'\ttest_must_fail git branch -m o/o o\n' span_id:254) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'git branch -m o/q o/p should fail when o/p exists' span_id: 261 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:265) (Token id:Id.Lit_Chars val:'\tgit branch o/q &&\n' span_id:266) (Token id:Id.Lit_Chars val:'\ttest_must_fail git branch -m o/q o/p\n' span_id:267) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'git branch -M o/q o/p should work when o/p exists' span_id: 274 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:278) (Token id:Id.Lit_Chars val:'\tgit branch -M o/q o/p\n' span_id:279) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'git branch -m -f o/q o/p should work when o/p exists' span_id: 286 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:290) (Token id:Id.Lit_Chars val:'\tgit branch o/q &&\n' span_id:291) (Token id:Id.Lit_Chars val:'\tgit branch -m -f o/q o/p\n' span_id:292) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git branch -m q r/q should fail when r exists' span_id:299))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:303) (Token id:Id.Lit_Chars val:'\tgit branch q &&\n' span_id:304) (Token id:Id.Lit_Chars val:'\tgit branch r &&\n' span_id:305) (Token id:Id.Lit_Chars val:'\ttest_must_fail git branch -m q r/q\n' span_id:306) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'git branch -M foo bar should fail when bar is checked out' span_id: 313 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:317) (Token id:Id.Lit_Chars val:'\tgit branch bar &&\n' span_id:318) (Token id:Id.Lit_Chars val:'\tgit checkout -b foo &&\n' span_id:319) (Token id: Id.Lit_Chars val: '\ttest_must_fail git branch -M bar foo\n' span_id: 320 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'git branch -M baz bam should succeed when baz is checked out' span_id: 327 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:331) (Token id:Id.Lit_Chars val:'\tgit checkout -b baz &&\n' span_id:332) (Token id:Id.Lit_Chars val:'\tgit branch bam &&\n' span_id:333) (Token id:Id.Lit_Chars val:'\tgit branch -M baz bam &&\n' span_id:334) (Token id:Id.Lit_Chars val:'\ttest $(git rev-parse --abbrev-ref HEAD) = bam\n' span_id:335) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'git branch -M baz bam should succeed when baz is checked out as linked working tree' span_id: 342 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:346) (Token id:Id.Lit_Chars val:'\tgit checkout master &&\n' span_id:347) (Token id:Id.Lit_Chars val:'\tgit worktree add -b baz bazdir &&\n' span_id:348) (Token id:Id.Lit_Chars val:'\tgit worktree add -f bazdir2 baz &&\n' span_id:349) (Token id:Id.Lit_Chars val:'\tgit branch -M baz bam &&\n' span_id:350) (Token id: Id.Lit_Chars val: '\ttest $(git -C bazdir rev-parse --abbrev-ref HEAD) = bam &&\n' span_id: 351 ) (Token id: Id.Lit_Chars val: '\ttest $(git -C bazdir2 rev-parse --abbrev-ref HEAD) = bam\n' span_id: 352 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'git branch -M baz bam should succeed within a worktree in which baz is checked out' span_id: 359 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:363) (Token id:Id.Lit_Chars val:'\tgit checkout -b baz &&\n' span_id:364) (Token id:Id.Lit_Chars val:'\tgit worktree add -f bazdir3 baz &&\n' span_id:365) (Token id:Id.Lit_Chars val:'\t(\n' span_id:366) (Token id:Id.Lit_Chars val:'\t\tcd bazdir3 &&\n' span_id:367) (Token id:Id.Lit_Chars val:'\t\tgit branch -M baz bam &&\n' span_id:368) (Token id:Id.Lit_Chars val:'\t\ttest $(git rev-parse --abbrev-ref HEAD) = bam\n' span_id:369) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:370) (Token id:Id.Lit_Chars val:'\ttest $(git rev-parse --abbrev-ref HEAD) = bam\n' span_id:371) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'git branch -M master should work when master is checked out' span_id: 378 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:382) (Token id:Id.Lit_Chars val:'\tgit checkout master &&\n' span_id:383) (Token id:Id.Lit_Chars val:'\tgit branch -M master\n' span_id:384) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'git branch -M master master should work when master is checked out' span_id: 391 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:395) (Token id:Id.Lit_Chars val:'\tgit checkout master &&\n' span_id:396) (Token id:Id.Lit_Chars val:'\tgit branch -M master master\n' span_id:397) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'git branch -M master2 master2 should work when master is checked out' span_id: 404 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:408) (Token id:Id.Lit_Chars val:'\tgit checkout master &&\n' span_id:409) (Token id:Id.Lit_Chars val:'\tgit branch master2 &&\n' span_id:410) (Token id:Id.Lit_Chars val:'\tgit branch -M master2 master2\n' span_id:411) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git branch -v -d t should work' span_id:418))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:422) (Token id:Id.Lit_Chars val:'\tgit branch t &&\n' span_id:423) (Token id:Id.Lit_Chars val:'\ttest_path_is_file .git/refs/heads/t &&\n' span_id:424) (Token id:Id.Lit_Chars val:'\tgit branch -v -d t &&\n' span_id:425) (Token id:Id.Lit_Chars val:'\ttest_path_is_missing .git/refs/heads/t\n' span_id:426) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git branch -v -m t s should work' span_id:433))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:437) (Token id:Id.Lit_Chars val:'\tgit branch t &&\n' span_id:438) (Token id:Id.Lit_Chars val:'\ttest_path_is_file .git/refs/heads/t &&\n' span_id:439) (Token id:Id.Lit_Chars val:'\tgit branch -v -m t s &&\n' span_id:440) (Token id:Id.Lit_Chars val:'\ttest_path_is_missing .git/refs/heads/t &&\n' span_id:441) (Token id: Id.Lit_Chars val: '\ttest_path_is_file .git/refs/heads/s &&\n' span_id: 442 ) (Token id:Id.Lit_Chars val:'\tgit branch -d s\n' span_id:443) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git branch -m -d t s should fail' span_id:450))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:454) (Token id:Id.Lit_Chars val:'\tgit branch t &&\n' span_id:455) (Token id:Id.Lit_Chars val:'\ttest_path_is_file .git/refs/heads/t &&\n' span_id:456) (Token id: Id.Lit_Chars val: '\ttest_must_fail git branch -m -d t s &&\n' span_id: 457 ) (Token id:Id.Lit_Chars val:'\tgit branch -d t &&\n' span_id:458) (Token id: Id.Lit_Chars val: '\ttest_path_is_missing .git/refs/heads/t\n' span_id: 459 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git branch --list -d t should fail' span_id:466))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:470) (Token id:Id.Lit_Chars val:'\tgit branch t &&\n' span_id:471) (Token id:Id.Lit_Chars val:'\ttest_path_is_file .git/refs/heads/t &&\n' span_id:472) (Token id: Id.Lit_Chars val: '\ttest_must_fail git branch --list -d t &&\n' span_id: 473 ) (Token id:Id.Lit_Chars val:'\tgit branch -d t &&\n' span_id:474) (Token id: Id.Lit_Chars val: '\ttest_path_is_missing .git/refs/heads/t\n' span_id: 475 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git branch --column' span_id:482))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:486) (Token id: Id.Lit_Chars val: '\tCOLUMNS=81 git branch --column=column >actual &&\n' span_id: 487 ) (Token id:Id.Lit_Chars val:'\tcat >expected <<\\EOF &&\n' span_id:488) (Token id: Id.Lit_Chars val: ' a/b/c bam foo l * master n o/p r\n' span_id: 489 ) (Token id: Id.Lit_Chars val: ' abc bar j/k m/m master2 o/o q\n' span_id: 490 ) (Token id:Id.Lit_Chars val:'EOF\n' span_id:491) (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:492) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'git branch --column with an extremely long branch name' span_id: 499 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:503) (Token id: Id.Lit_Chars val: '\tlong=this/is/a/part/of/long/branch/name &&\n' span_id: 504 ) (Token id:Id.Lit_Chars val:'\tlong=z$long/$long/$long/$long &&\n' span_id:505) (Token id: Id.Lit_Chars val: '\ttest_when_finished "git branch -d $long" &&\n' span_id: 506 ) (Token id:Id.Lit_Chars val:'\tgit branch $long &&\n' span_id:507) (Token id: Id.Lit_Chars val: '\tCOLUMNS=80 git branch --column=column >actual &&\n' span_id: 508 ) (Token id:Id.Lit_Chars val:'\tcat >expected <<EOF &&\n' span_id:509) (Token id:Id.Lit_Chars val:' a/b/c\n' span_id:510) (Token id:Id.Lit_Chars val:' abc\n' span_id:511) (Token id:Id.Lit_Chars val:' bam\n' span_id:512) (Token id:Id.Lit_Chars val:' bar\n' span_id:513) (Token id:Id.Lit_Chars val:' foo\n' span_id:514) (Token id:Id.Lit_Chars val:' j/k\n' span_id:515) (Token id:Id.Lit_Chars val:' l\n' span_id:516) (Token id:Id.Lit_Chars val:' m/m\n' span_id:517) (Token id:Id.Lit_Chars val:'* master\n' span_id:518) (Token id:Id.Lit_Chars val:' master2\n' span_id:519) (Token id:Id.Lit_Chars val:' n\n' span_id:520) (Token id:Id.Lit_Chars val:' o/o\n' span_id:521) (Token id:Id.Lit_Chars val:' o/p\n' span_id:522) (Token id:Id.Lit_Chars val:' q\n' span_id:523) (Token id:Id.Lit_Chars val:' r\n' span_id:524) (Token id:Id.Lit_Chars val:' $long\n' span_id:525) (Token id:Id.Lit_Chars val:'EOF\n' span_id:526) (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:527) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git branch with column.*' span_id:534))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:538) (Token id:Id.Lit_Chars val:'\tgit config column.ui column &&\n' span_id:539) (Token id:Id.Lit_Chars val:'\tgit config column.branch "dense" &&\n' span_id:540) (Token id:Id.Lit_Chars val:'\tCOLUMNS=80 git branch >actual &&\n' span_id:541) (Token id:Id.Lit_Chars val:'\tgit config --unset column.branch &&\n' span_id:542) (Token id:Id.Lit_Chars val:'\tgit config --unset column.ui &&\n' span_id:543) (Token id:Id.Lit_Chars val:'\tcat >expected <<\\EOF &&\n' span_id:544) (Token id: Id.Lit_Chars val: ' a/b/c bam foo l * master n o/p r\n' span_id: 545 ) (Token id:Id.Lit_Chars val:' abc bar j/k m/m master2 o/o q\n' span_id:546) (Token id:Id.Lit_Chars val:'EOF\n' span_id:547) (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:548) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git branch --column -v should fail' span_id:555))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:559) (Token id: Id.Lit_Chars val: '\ttest_must_fail git branch --column -v\n' span_id: 560 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git branch -v with column.ui ignored' span_id:567))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:571) (Token id:Id.Lit_Chars val:'\tgit config column.ui column &&\n' span_id:572) (Token id: Id.Lit_Chars val: '\tCOLUMNS=80 git branch -v | cut -c -10 | sed "s/ *$//" >actual &&\n' span_id: 573 ) (Token id:Id.Lit_Chars val:'\tgit config --unset column.ui &&\n' span_id:574) (Token id:Id.Lit_Chars val:'\tcat >expected <<\\EOF &&\n' span_id:575) (Token id:Id.Lit_Chars val:' a/b/c\n' span_id:576) (Token id:Id.Lit_Chars val:' abc\n' span_id:577) (Token id:Id.Lit_Chars val:' bam\n' span_id:578) (Token id:Id.Lit_Chars val:' bar\n' span_id:579) (Token id:Id.Lit_Chars val:' foo\n' span_id:580) (Token id:Id.Lit_Chars val:' j/k\n' span_id:581) (Token id:Id.Lit_Chars val:' l\n' span_id:582) (Token id:Id.Lit_Chars val:' m/m\n' span_id:583) (Token id:Id.Lit_Chars val:'* master\n' span_id:584) (Token id:Id.Lit_Chars val:' master2\n' span_id:585) (Token id:Id.Lit_Chars val:' n\n' span_id:586) (Token id:Id.Lit_Chars val:' o/o\n' span_id:587) (Token id:Id.Lit_Chars val:' o/p\n' span_id:588) (Token id:Id.Lit_Chars val:' q\n' span_id:589) (Token id:Id.Lit_Chars val:' r\n' span_id:590) (Token id:Id.Lit_Chars val:'EOF\n' span_id:591) (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:592) ) } ) (C {(mv)} {(.git/config)} {(.git/config-saved)}) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'git branch -m q q2 without config should succeed' span_id: 606 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:610) (Token id:Id.Lit_Chars val:'\tgit branch -m q q2 &&\n' span_id:611) (Token id:Id.Lit_Chars val:'\tgit branch -m q2 q\n' span_id:612) ) } ) (C {(mv)} {(.git/config-saved)} {(.git/config)}) (C {(git)} {(config)} {(branch.s/s.dummy)} {(Hello)}) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'git branch -m s/s s should work when s/t is deleted' span_id: 635 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:639) (Token id:Id.Lit_Chars val:'\tgit branch -l s/s &&\n' span_id:640) (Token id:Id.Lit_Chars val:'\tgit reflog exists refs/heads/s/s &&\n' span_id:641) (Token id:Id.Lit_Chars val:'\tgit branch -l s/t &&\n' span_id:642) (Token id:Id.Lit_Chars val:'\tgit reflog exists refs/heads/s/t &&\n' span_id:643) (Token id:Id.Lit_Chars val:'\tgit branch -d s/t &&\n' span_id:644) (Token id:Id.Lit_Chars val:'\tgit branch -m s/s s &&\n' span_id:645) (Token id:Id.Lit_Chars val:'\tgit reflog exists refs/heads/s\n' span_id:646) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'config information was renamed, too' span_id:653))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:657) (Token id: Id.Lit_Chars val: '\ttest $(git config branch.s.dummy) = Hello &&\n' span_id: 658 ) (Token id:Id.Lit_Chars val:'\ttest_must_fail git config branch.s/s/dummy\n' span_id:659) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'deleting a symref' span_id:666))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:670) (Token id:Id.Lit_Chars val:'\tgit branch target &&\n' span_id:671) (Token id:Id.Lit_Chars val:'\tgit symbolic-ref refs/heads/symref refs/heads/target &&\n' span_id:672) (Token id: Id.Lit_Chars val: '\techo "Deleted branch symref (was refs/heads/target)." >expect &&\n' span_id: 673 ) (Token id:Id.Lit_Chars val:'\tgit branch -d symref >actual &&\n' span_id:674) (Token id: Id.Lit_Chars val: '\ttest_path_is_file .git/refs/heads/target &&\n' span_id: 675 ) (Token id:Id.Lit_Chars val:'\ttest_path_is_missing .git/refs/heads/symref &&\n' span_id:676) (Token id:Id.Lit_Chars val:'\ttest_i18ncmp expect actual\n' span_id:677) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'deleting a dangling symref' span_id:684))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:688) (Token id: Id.Lit_Chars val: '\tgit symbolic-ref refs/heads/dangling-symref nowhere &&\n' span_id: 689 ) (Token id:Id.Lit_Chars val:'\ttest_path_is_file .git/refs/heads/dangling-symref &&\n' span_id:690) (Token id: Id.Lit_Chars val: '\techo "Deleted branch dangling-symref (was nowhere)." >expect &&\n' span_id: 691 ) (Token id:Id.Lit_Chars val:'\tgit branch -d dangling-symref >actual &&\n' span_id:692) (Token id: Id.Lit_Chars val: '\ttest_path_is_missing .git/refs/heads/dangling-symref &&\n' span_id: 693 ) (Token id:Id.Lit_Chars val:'\ttest_i18ncmp expect actual\n' span_id:694) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'deleting a self-referential symref' span_id:701))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:705) (Token id: Id.Lit_Chars val: '\tgit symbolic-ref refs/heads/self-reference refs/heads/self-reference &&\n' span_id: 706 ) (Token id:Id.Lit_Chars val:'\ttest_path_is_file .git/refs/heads/self-reference &&\n' span_id:707) (Token id: Id.Lit_Chars val: '\techo "Deleted branch self-reference (was refs/heads/self-reference)." >expect &&\n' span_id: 708 ) (Token id:Id.Lit_Chars val:'\tgit branch -d self-reference >actual &&\n' span_id:709) (Token id: Id.Lit_Chars val: '\ttest_path_is_missing .git/refs/heads/self-reference &&\n' span_id: 710 ) (Token id:Id.Lit_Chars val:'\ttest_i18ncmp expect actual\n' span_id:711) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'renaming a symref is not allowed' span_id:718))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:722) (Token id: Id.Lit_Chars val: '\tgit symbolic-ref refs/heads/master2 refs/heads/master &&\n' span_id: 723 ) (Token id:Id.Lit_Chars val:'\ttest_must_fail git branch -m master2 master3 &&\n' span_id:724) (Token id: Id.Lit_Chars val: '\tgit symbolic-ref refs/heads/master2 &&\n' span_id: 725 ) (Token id:Id.Lit_Chars val:'\ttest_path_is_file .git/refs/heads/master &&\n' span_id:726) (Token id: Id.Lit_Chars val: '\ttest_path_is_missing .git/refs/heads/master3\n' span_id: 727 ) ) } ) (C {(test_expect_success)} {(SYMLINKS)} { (SQ (Token id: Id.Lit_Chars val: 'git branch -m u v should fail when the reflog for u is a symlink' span_id: 736 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:740) (Token id:Id.Lit_Chars val:'\tgit branch -l u &&\n' span_id:741) (Token id:Id.Lit_Chars val:'\tmv .git/logs/refs/heads/u real-u &&\n' span_id:742) (Token id: Id.Lit_Chars val: '\tln -s real-u .git/logs/refs/heads/u &&\n' span_id: 743 ) (Token id:Id.Lit_Chars val:'\ttest_must_fail git branch -m u v\n' span_id:744) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'test tracking setup via --track' span_id:751))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:755) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:756) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 757 ) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n' span_id: 758 ) (Token id:Id.Lit_Chars val:'\tgit branch --track my1 local/master &&\n' span_id:759) (Token id: Id.Lit_Chars val: '\ttest $(git config branch.my1.remote) = local &&\n' span_id: 760 ) (Token id:Id.Lit_Chars val:'\ttest $(git config branch.my1.merge) = refs/heads/master\n' span_id:761) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'test tracking setup (non-wildcard, matching)' span_id:768))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:772) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:773) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/master:refs/remotes/local/master &&\n' span_id: 774 ) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n' span_id: 775 ) (Token id:Id.Lit_Chars val:'\tgit branch --track my4 local/master &&\n' span_id:776) (Token id: Id.Lit_Chars val: '\ttest $(git config branch.my4.remote) = local &&\n' span_id: 777 ) (Token id:Id.Lit_Chars val:'\ttest $(git config branch.my4.merge) = refs/heads/master\n' span_id:778) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'tracking setup fails on non-matching refspec' span_id:785))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:789) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:790) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 791 ) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n' span_id: 792 ) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/s:refs/remotes/local/s &&\n' span_id: 793 ) (Token id:Id.Lit_Chars val:'\ttest_must_fail git branch --track my5 local/master &&\n' span_id:794) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config branch.my5.remote &&\n' span_id: 795 ) (Token id:Id.Lit_Chars val:'\ttest_must_fail git config branch.my5.merge\n' span_id:796) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'test tracking setup via config' span_id:803))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:807) (Token id: Id.Lit_Chars val: '\tgit config branch.autosetupmerge true &&\n' span_id: 808 ) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:809) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 810 ) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n' span_id: 811 ) (Token id:Id.Lit_Chars val:'\tgit branch my3 local/master &&\n' span_id:812) (Token id: Id.Lit_Chars val: '\ttest $(git config branch.my3.remote) = local &&\n' span_id: 813 ) (Token id:Id.Lit_Chars val:'\ttest $(git config branch.my3.merge) = refs/heads/master\n' span_id:814) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'test overriding tracking setup via --no-track' span_id:821))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:825) (Token id: Id.Lit_Chars val: '\tgit config branch.autosetupmerge true &&\n' span_id: 826 ) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:827) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 828 ) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n' span_id: 829 ) (Token id:Id.Lit_Chars val:'\tgit branch --no-track my2 local/master &&\n' span_id:830) (Token id: Id.Lit_Chars val: '\tgit config branch.autosetupmerge false &&\n' span_id: 831 ) (Token id:Id.Lit_Chars val:'\t! test "$(git config branch.my2.remote)" = local &&\n' span_id:832) (Token id: Id.Lit_Chars val: '\t! test "$(git config branch.my2.merge)" = refs/heads/master\n' span_id: 833 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'no tracking without .fetch entries' span_id:840))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:844) (Token id: Id.Lit_Chars val: '\tgit config branch.autosetupmerge true &&\n' span_id: 845 ) (Token id:Id.Lit_Chars val:'\tgit branch my6 s &&\n' span_id:846) (Token id: Id.Lit_Chars val: '\tgit config branch.autosetupmerge false &&\n' span_id: 847 ) (Token id:Id.Lit_Chars val:'\ttest -z "$(git config branch.my6.remote)" &&\n' span_id:848) (Token id: Id.Lit_Chars val: '\ttest -z "$(git config branch.my6.merge)"\n' span_id: 849 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'test tracking setup via --track but deeper' span_id:856))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:860) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:861) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 862 ) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/o/o || git fetch local) &&\n' span_id: 863 ) (Token id:Id.Lit_Chars val:'\tgit branch --track my7 local/o/o &&\n' span_id:864) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.my7.remote)" = local &&\n' span_id: 865 ) (Token id:Id.Lit_Chars val:'\ttest "$(git config branch.my7.merge)" = refs/heads/o/o\n' span_id:866) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'test deleting branch deletes branch config' span_id:873))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:877) (Token id:Id.Lit_Chars val:'\tgit branch -d my7 &&\n' span_id:878) (Token id:Id.Lit_Chars val:'\ttest -z "$(git config branch.my7.remote)" &&\n' span_id:879) (Token id: Id.Lit_Chars val: '\ttest -z "$(git config branch.my7.merge)"\n' span_id: 880 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'test deleting branch without config' span_id:887))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:891) (Token id:Id.Lit_Chars val:'\tgit branch my7 s &&\n' span_id:892) (Token id:Id.Lit_Chars val:'\tsha1=$(git rev-parse my7 | cut -c 1-7) &&\n' span_id:893) (Token id: Id.Lit_Chars val: '\techo "Deleted branch my7 (was $sha1)." >expect &&\n' span_id: 894 ) (Token id:Id.Lit_Chars val:'\tgit branch -d my7 >actual 2>&1 &&\n' span_id:895) (Token id:Id.Lit_Chars val:'\ttest_i18ncmp expect actual\n' span_id:896) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'deleting currently checked out branch fails' span_id:903))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:907) (Token id:Id.Lit_Chars val:'\tgit worktree add -b my7 my7 &&\n' span_id:908) (Token id:Id.Lit_Chars val:'\ttest_must_fail git -C my7 branch -d my7 &&\n' span_id:909) (Token id:Id.Lit_Chars val:'\ttest_must_fail git branch -d my7\n' span_id:910) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'test --track without .fetch entries' span_id:917))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:921) (Token id:Id.Lit_Chars val:'\tgit branch --track my8 &&\n' span_id:922) (Token id:Id.Lit_Chars val:'\ttest "$(git config branch.my8.remote)" &&\n' span_id:923) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.my8.merge)"\n' span_id: 924 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'branch from non-branch HEAD w/autosetupmerge=always' span_id: 931 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:935) (Token id: Id.Lit_Chars val: '\tgit config branch.autosetupmerge always &&\n' span_id: 936 ) (Token id:Id.Lit_Chars val:'\tgit branch my9 HEAD^ &&\n' span_id:937) (Token id: Id.Lit_Chars val: '\tgit config branch.autosetupmerge false\n' span_id: 938 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'branch from non-branch HEAD w/--track causes failure' span_id: 945 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:949) (Token id: Id.Lit_Chars val: '\ttest_must_fail git branch --track my10 HEAD^\n' span_id: 950 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'branch from tag w/--track causes failure' span_id:957))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:961) (Token id:Id.Lit_Chars val:'\tgit tag foobar &&\n' span_id:962) (Token id:Id.Lit_Chars val:'\ttest_must_fail git branch --track my11 foobar\n' span_id:963) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--set-upstream-to fails on multiple branches' span_id:970))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:974) (Token id: Id.Lit_Chars val: '\ttest_must_fail git branch --set-upstream-to master a b c\n' span_id: 975 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--set-upstream-to fails on detached HEAD' span_id:982))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:986) (Token id:Id.Lit_Chars val:'\tgit checkout HEAD^{} &&\n' span_id:987) (Token id:Id.Lit_Chars val:'\ttest_must_fail git branch --set-upstream-to master &&\n' span_id:988) (Token id:Id.Lit_Chars val:'\tgit checkout -\n' span_id:989) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--set-upstream-to fails on a missing dst branch' span_id:996))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1000) (Token id: Id.Lit_Chars val: '\ttest_must_fail git branch --set-upstream-to master does-not-exist\n' span_id: 1001 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: '--set-upstream-to fails on a missing src branch' span_id: 1008 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1012) (Token id: Id.Lit_Chars val: '\ttest_must_fail git branch --set-upstream-to does-not-exist master\n' span_id: 1013 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--set-upstream-to fails on a non-ref' span_id:1020))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1024) (Token id: Id.Lit_Chars val: '\ttest_must_fail git branch --set-upstream-to HEAD^{}\n' span_id: 1025 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--set-upstream-to fails on locked config' span_id:1032))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1036) (Token id: Id.Lit_Chars val: '\ttest_when_finished "rm -f .git/config.lock" &&\n' span_id: 1037 ) (Token id:Id.Lit_Chars val:'\t>.git/config.lock &&\n' span_id:1038) (Token id:Id.Lit_Chars val:'\tgit branch locked &&\n' span_id:1039) (Token id:Id.Lit_Chars val:'\ttest_must_fail git branch --set-upstream-to locked\n' span_id:1040) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'use --set-upstream-to modify HEAD' span_id:1047))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1051) (Token id: Id.Lit_Chars val: '\ttest_config branch.master.remote foo &&\n' span_id: 1052 ) (Token id:Id.Lit_Chars val:'\ttest_config branch.master.merge foo &&\n' span_id:1053) (Token id:Id.Lit_Chars val:'\tgit branch my12 &&\n' span_id:1054) (Token id:Id.Lit_Chars val:'\tgit branch --set-upstream-to my12 &&\n' span_id:1055) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.master.remote)" = "." &&\n' span_id: 1056 ) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.master.merge)" = "refs/heads/my12"\n' span_id: 1057 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'use --set-upstream-to modify a particular branch' span_id: 1064 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1068) (Token id:Id.Lit_Chars val:'\tgit branch my13 &&\n' span_id:1069) (Token id:Id.Lit_Chars val:'\tgit branch --set-upstream-to master my13 &&\n' span_id:1070) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.my13.remote)" = "." &&\n' span_id: 1071 ) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.my13.merge)" = "refs/heads/master"\n' span_id: 1072 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: '--unset-upstream should fail if given a non-existent branch' span_id: 1079 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1083) (Token id: Id.Lit_Chars val: '\ttest_must_fail git branch --unset-upstream i-dont-exist\n' span_id: 1084 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: '--unset-upstream should fail if config is locked' span_id: 1091 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1095) (Token id: Id.Lit_Chars val: '\ttest_when_finished "rm -f .git/config.lock" &&\n' span_id: 1096 ) (Token id:Id.Lit_Chars val:'\tgit branch --set-upstream-to locked &&\n' span_id:1097) (Token id:Id.Lit_Chars val:'\t>.git/config.lock &&\n' span_id:1098) (Token id:Id.Lit_Chars val:'\ttest_must_fail git branch --unset-upstream\n' span_id:1099) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'test --unset-upstream on HEAD' span_id:1106))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1110) (Token id:Id.Lit_Chars val:'\tgit branch my14 &&\n' span_id:1111) (Token id:Id.Lit_Chars val:'\ttest_config branch.master.remote foo &&\n' span_id:1112) (Token id: Id.Lit_Chars val: '\ttest_config branch.master.merge foo &&\n' span_id: 1113 ) (Token id:Id.Lit_Chars val:'\tgit branch --set-upstream-to my14 &&\n' span_id:1114) (Token id:Id.Lit_Chars val:'\tgit branch --unset-upstream &&\n' span_id:1115) (Token id:Id.Lit_Chars val:'\ttest_must_fail git config branch.master.remote &&\n' span_id:1116) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config branch.master.merge &&\n' span_id: 1117 ) (Token id:Id.Lit_Chars val:'\t# fail for a branch without upstream set\n' span_id:1118) (Token id: Id.Lit_Chars val: '\ttest_must_fail git branch --unset-upstream\n' span_id: 1119 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: '--unset-upstream should fail on multiple branches' span_id: 1126 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1130) (Token id: Id.Lit_Chars val: '\ttest_must_fail git branch --unset-upstream a b c\n' span_id: 1131 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--unset-upstream should fail on detached HEAD' span_id:1138))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1142) (Token id:Id.Lit_Chars val:'\tgit checkout HEAD^{} &&\n' span_id:1143) (Token id:Id.Lit_Chars val:'\ttest_must_fail git branch --unset-upstream &&\n' span_id:1144) (Token id:Id.Lit_Chars val:'\tgit checkout -\n' span_id:1145) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'test --unset-upstream on a particular branch' span_id:1152))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1156) (Token id:Id.Lit_Chars val:'\tgit branch my15 &&\n' span_id:1157) (Token id:Id.Lit_Chars val:'\tgit branch --set-upstream-to master my14 &&\n' span_id:1158) (Token id: Id.Lit_Chars val: '\tgit branch --unset-upstream my14 &&\n' span_id: 1159 ) (Token id:Id.Lit_Chars val:'\ttest_must_fail git config branch.my14.remote &&\n' span_id:1160) (Token id: Id.Lit_Chars val: '\ttest_must_fail git config branch.my14.merge\n' span_id: 1161 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: '--set-upstream shows message when creating a new branch that exists as remote-tracking' span_id: 1168 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1172) (Token id: Id.Lit_Chars val: '\tgit update-ref refs/remotes/origin/master HEAD &&\n' span_id: 1173 ) (Token id:Id.Lit_Chars val:'\tgit branch --set-upstream origin/master 2>actual &&\n' span_id:1174) (Token id: Id.Lit_Chars val: '\ttest_when_finished git update-ref -d refs/remotes/origin/master &&\n' span_id: 1175 ) (Token id:Id.Lit_Chars val:'\ttest_when_finished git branch -d origin/master &&\n' span_id:1176) (Token id:Id.Lit_Chars val:'\tcat >expected <<EOF &&\n' span_id:1177) (Token id: Id.Lit_Chars val: 'The --set-upstream flag is deprecated and will be removed. Consider using --track or --set-upstream-to\n' span_id: 1178 ) (Token id:Id.Lit_Chars val:'\n' span_id:1179) (Token id:Id.Lit_Chars val:'If you wanted to make ' span_id:1180) ) (DQ ("'master'")) (SQ (Token id:Id.Lit_Chars val:' track ' span_id:1186)) (DQ ("'origin/master'")) (SQ (Token id:Id.Lit_Chars val:', do this:\n' span_id:1192) (Token id:Id.Lit_Chars val:'\n' span_id:1193) (Token id:Id.Lit_Chars val:' git branch -d origin/master\n' span_id:1194) (Token id: Id.Lit_Chars val: ' git branch --set-upstream-to origin/master\n' span_id: 1195 ) (Token id:Id.Lit_Chars val:'EOF\n' span_id:1196) (Token id:Id.Lit_Chars val:'\ttest_i18ncmp expected actual\n' span_id:1197) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: '--set-upstream with two args only shows the deprecation message' span_id: 1204 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1208) (Token id: Id.Lit_Chars val: '\tgit branch --set-upstream master my13 2>actual &&\n' span_id: 1209 ) (Token id: Id.Lit_Chars val: '\ttest_when_finished git branch --unset-upstream master &&\n' span_id: 1210 ) (Token id:Id.Lit_Chars val:'\tcat >expected <<EOF &&\n' span_id:1211) (Token id: Id.Lit_Chars val: 'The --set-upstream flag is deprecated and will be removed. Consider using --track or --set-upstream-to\n' span_id: 1212 ) (Token id:Id.Lit_Chars val:'EOF\n' span_id:1213) (Token id:Id.Lit_Chars val:'\ttest_i18ncmp expected actual\n' span_id:1214) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: '--set-upstream with one arg only shows the deprecation message if the branch existed' span_id: 1221 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1225) (Token id: Id.Lit_Chars val: '\tgit branch --set-upstream my13 2>actual &&\n' span_id: 1226 ) (Token id:Id.Lit_Chars val:'\ttest_when_finished git branch --unset-upstream my13 &&\n' span_id:1227) (Token id:Id.Lit_Chars val:'\tcat >expected <<EOF &&\n' span_id:1228) (Token id: Id.Lit_Chars val: 'The --set-upstream flag is deprecated and will be removed. Consider using --track or --set-upstream-to\n' span_id: 1229 ) (Token id:Id.Lit_Chars val:'EOF\n' span_id:1230) (Token id:Id.Lit_Chars val:'\ttest_i18ncmp expected actual\n' span_id:1231) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: '--set-upstream-to notices an error to set branch as own upstream' span_id: 1238 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1242) (Token id: Id.Lit_Chars val: '\tgit branch --set-upstream-to refs/heads/my13 my13 2>actual &&\n' span_id: 1243 ) (Token id:Id.Lit_Chars val:'\tcat >expected <<-\\EOF &&\n' span_id:1244) (Token id: Id.Lit_Chars val: '\twarning: Not setting branch my13 as its own upstream.\n' span_id: 1245 ) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:1246) (Token id: Id.Lit_Chars val: '\ttest_expect_code 1 git config branch.my13.remote &&\n' span_id: 1247 ) (Token id:Id.Lit_Chars val:'\ttest_expect_code 1 git config branch.my13.merge &&\n' span_id:1248) (Token id:Id.Lit_Chars val:'\ttest_i18ncmp expected actual\n' span_id:1249) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1258) fd: -1 arg_word: {(expect)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:1261) fd: -1 here_begin: {(EOF)} here_end_span_id: 1273 stdin_parts: [ ($ Id.VSub_DollarName '$_z40') (' ') ($ Id.VSub_DollarName '$HEAD') (' ') ($ Id.VSub_DollarName '$GIT_COMMITTER_NAME') (' <') ($ Id.VSub_DollarName '$GIT_COMMITTER_EMAIL') ('> 1117150200 +0000\tbranch: Created from master\n') ] ) ] ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'git checkout -b g/h/i -l should create a branch and a log' span_id: 1277 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1281) (Token id: Id.Lit_Chars val: '\tGIT_COMMITTER_DATE="2005-05-26 23:30" \\\n' span_id: 1282 ) (Token id:Id.Lit_Chars val:'\tgit checkout -b g/h/i -l master &&\n' span_id:1283) (Token id: Id.Lit_Chars val: '\ttest_path_is_file .git/refs/heads/g/h/i &&\n' span_id: 1284 ) (Token id:Id.Lit_Chars val:'\ttest_path_is_file .git/logs/refs/heads/g/h/i &&\n' span_id:1285) (Token id: Id.Lit_Chars val: '\ttest_cmp expect .git/logs/refs/heads/g/h/i\n' span_id: 1286 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'checkout -b makes reflog by default' span_id:1293))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1297) (Token id:Id.Lit_Chars val:'\tgit checkout master &&\n' span_id:1298) (Token id:Id.Lit_Chars val:'\tgit config --unset core.logAllRefUpdates &&\n' span_id:1299) (Token id:Id.Lit_Chars val:'\tgit checkout -b alpha &&\n' span_id:1300) (Token id:Id.Lit_Chars val:'\tgit rev-parse --verify alpha@{0}\n' span_id:1301) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'checkout -b does not make reflog when core.logAllRefUpdates = false' span_id: 1308 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1312) (Token id:Id.Lit_Chars val:'\tgit checkout master &&\n' span_id:1313) (Token id:Id.Lit_Chars val:'\tgit config core.logAllRefUpdates false &&\n' span_id:1314) (Token id:Id.Lit_Chars val:'\tgit checkout -b beta &&\n' span_id:1315) (Token id:Id.Lit_Chars val:'\ttest_must_fail git rev-parse --verify beta@{0}\n' span_id:1316) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'checkout -b with -l makes reflog when core.logAllRefUpdates = false' span_id: 1323 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1327) (Token id:Id.Lit_Chars val:'\tgit checkout master &&\n' span_id:1328) (Token id:Id.Lit_Chars val:'\tgit checkout -lb gamma &&\n' span_id:1329) (Token id: Id.Lit_Chars val: '\tgit config --unset core.logAllRefUpdates &&\n' span_id: 1330 ) (Token id:Id.Lit_Chars val:'\tgit rev-parse --verify gamma@{0}\n' span_id:1331) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'avoid ambiguous track' span_id:1338))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1342) (Token id: Id.Lit_Chars val: '\tgit config branch.autosetupmerge true &&\n' span_id: 1343 ) (Token id:Id.Lit_Chars val:'\tgit config remote.ambi1.url lalala &&\n' span_id:1344) (Token id: Id.Lit_Chars val: '\tgit config remote.ambi1.fetch refs/heads/lalala:refs/heads/master &&\n' span_id: 1345 ) (Token id:Id.Lit_Chars val:'\tgit config remote.ambi2.url lilili &&\n' span_id:1346) (Token id: Id.Lit_Chars val: '\tgit config remote.ambi2.fetch refs/heads/lilili:refs/heads/master &&\n' span_id: 1347 ) (Token id:Id.Lit_Chars val:'\ttest_must_fail git branch all1 master &&\n' span_id:1348) (Token id: Id.Lit_Chars val: '\ttest -z "$(git config branch.all1.merge)"\n' span_id: 1349 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'autosetuprebase local on a tracked local branch' span_id: 1356 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1360) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:1361) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 1362 ) (Token id:Id.Lit_Chars val:'\tgit config branch.autosetuprebase local &&\n' span_id:1363) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/o || git fetch local) &&\n' span_id: 1364 ) (Token id:Id.Lit_Chars val:'\tgit branch mybase &&\n' span_id:1365) (Token id:Id.Lit_Chars val:'\tgit branch --track myr1 mybase &&\n' span_id:1366) (Token id:Id.Lit_Chars val:'\ttest "$(git config branch.myr1.remote)" = . &&\n' span_id:1367) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.myr1.merge)" = refs/heads/mybase &&\n' span_id: 1368 ) (Token id:Id.Lit_Chars val:'\ttest "$(git config branch.myr1.rebase)" = true\n' span_id:1369) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'autosetuprebase always on a tracked local branch' span_id: 1376 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1380) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:1381) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 1382 ) (Token id:Id.Lit_Chars val:'\tgit config branch.autosetuprebase always &&\n' span_id:1383) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/o || git fetch local) &&\n' span_id: 1384 ) (Token id:Id.Lit_Chars val:'\tgit branch mybase2 &&\n' span_id:1385) (Token id:Id.Lit_Chars val:'\tgit branch --track myr2 mybase &&\n' span_id:1386) (Token id:Id.Lit_Chars val:'\ttest "$(git config branch.myr2.remote)" = . &&\n' span_id:1387) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.myr2.merge)" = refs/heads/mybase &&\n' span_id: 1388 ) (Token id:Id.Lit_Chars val:'\ttest "$(git config branch.myr2.rebase)" = true\n' span_id:1389) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'autosetuprebase remote on a tracked local branch' span_id: 1396 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1400) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:1401) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 1402 ) (Token id:Id.Lit_Chars val:'\tgit config branch.autosetuprebase remote &&\n' span_id:1403) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/o || git fetch local) &&\n' span_id: 1404 ) (Token id:Id.Lit_Chars val:'\tgit branch mybase3 &&\n' span_id:1405) (Token id:Id.Lit_Chars val:'\tgit branch --track myr3 mybase2 &&\n' span_id:1406) (Token id:Id.Lit_Chars val:'\ttest "$(git config branch.myr3.remote)" = . &&\n' span_id:1407) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.myr3.merge)" = refs/heads/mybase2 &&\n' span_id: 1408 ) (Token id:Id.Lit_Chars val:'\t! test "$(git config branch.myr3.rebase)" = true\n' span_id:1409) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'autosetuprebase never on a tracked local branch' span_id: 1416 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1420) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:1421) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 1422 ) (Token id:Id.Lit_Chars val:'\tgit config branch.autosetuprebase never &&\n' span_id:1423) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/o || git fetch local) &&\n' span_id: 1424 ) (Token id:Id.Lit_Chars val:'\tgit branch mybase4 &&\n' span_id:1425) (Token id:Id.Lit_Chars val:'\tgit branch --track myr4 mybase2 &&\n' span_id:1426) (Token id:Id.Lit_Chars val:'\ttest "$(git config branch.myr4.remote)" = . &&\n' span_id:1427) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.myr4.merge)" = refs/heads/mybase2 &&\n' span_id: 1428 ) (Token id:Id.Lit_Chars val:'\t! test "$(git config branch.myr4.rebase)" = true\n' span_id:1429) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'autosetuprebase local on a tracked remote branch' span_id: 1436 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1440) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:1441) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 1442 ) (Token id:Id.Lit_Chars val:'\tgit config branch.autosetuprebase local &&\n' span_id:1443) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n' span_id: 1444 ) (Token id:Id.Lit_Chars val:'\tgit branch --track myr5 local/master &&\n' span_id:1445) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.myr5.remote)" = local &&\n' span_id: 1446 ) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.myr5.merge)" = refs/heads/master &&\n' span_id: 1447 ) (Token id:Id.Lit_Chars val:'\t! test "$(git config branch.myr5.rebase)" = true\n' span_id:1448) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'autosetuprebase never on a tracked remote branch' span_id: 1455 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1459) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:1460) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 1461 ) (Token id:Id.Lit_Chars val:'\tgit config branch.autosetuprebase never &&\n' span_id:1462) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n' span_id: 1463 ) (Token id:Id.Lit_Chars val:'\tgit branch --track myr6 local/master &&\n' span_id:1464) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.myr6.remote)" = local &&\n' span_id: 1465 ) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.myr6.merge)" = refs/heads/master &&\n' span_id: 1466 ) (Token id:Id.Lit_Chars val:'\t! test "$(git config branch.myr6.rebase)" = true\n' span_id:1467) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'autosetuprebase remote on a tracked remote branch' span_id: 1474 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1478) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:1479) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 1480 ) (Token id:Id.Lit_Chars val:'\tgit config branch.autosetuprebase remote &&\n' span_id:1481) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n' span_id: 1482 ) (Token id:Id.Lit_Chars val:'\tgit branch --track myr7 local/master &&\n' span_id:1483) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.myr7.remote)" = local &&\n' span_id: 1484 ) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.myr7.merge)" = refs/heads/master &&\n' span_id: 1485 ) (Token id:Id.Lit_Chars val:'\ttest "$(git config branch.myr7.rebase)" = true\n' span_id:1486) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'autosetuprebase always on a tracked remote branch' span_id: 1493 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1497) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:1498) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 1499 ) (Token id:Id.Lit_Chars val:'\tgit config branch.autosetuprebase remote &&\n' span_id:1500) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n' span_id: 1501 ) (Token id:Id.Lit_Chars val:'\tgit branch --track myr8 local/master &&\n' span_id:1502) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.myr8.remote)" = local &&\n' span_id: 1503 ) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.myr8.merge)" = refs/heads/master &&\n' span_id: 1504 ) (Token id:Id.Lit_Chars val:'\ttest "$(git config branch.myr8.rebase)" = true\n' span_id:1505) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'autosetuprebase unconfigured on a tracked remote branch' span_id: 1512 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1516) (Token id: Id.Lit_Chars val: '\tgit config --unset branch.autosetuprebase &&\n' span_id: 1517 ) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:1518) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 1519 ) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n' span_id: 1520 ) (Token id:Id.Lit_Chars val:'\tgit branch --track myr9 local/master &&\n' span_id:1521) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.myr9.remote)" = local &&\n' span_id: 1522 ) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.myr9.merge)" = refs/heads/master &&\n' span_id: 1523 ) (Token id:Id.Lit_Chars val:'\ttest "z$(git config branch.myr9.rebase)" = z\n' span_id:1524) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'autosetuprebase unconfigured on a tracked local branch' span_id: 1531 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1535) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:1536) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 1537 ) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/o || git fetch local) &&\n' span_id: 1538 ) (Token id:Id.Lit_Chars val:'\tgit branch mybase10 &&\n' span_id:1539) (Token id: Id.Lit_Chars val: '\tgit branch --track myr10 mybase2 &&\n' span_id: 1540 ) (Token id:Id.Lit_Chars val:'\ttest "$(git config branch.myr10.remote)" = . &&\n' span_id:1541) (Token id: Id.Lit_Chars val: '\ttest "$(git config branch.myr10.merge)" = refs/heads/mybase2 &&\n' span_id: 1542 ) (Token id:Id.Lit_Chars val:'\ttest "z$(git config branch.myr10.rebase)" = z\n' span_id:1543) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'autosetuprebase unconfigured on untracked local branch' span_id: 1550 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1554) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:1555) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 1556 ) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n' span_id: 1557 ) (Token id:Id.Lit_Chars val:'\tgit branch --no-track myr11 mybase2 &&\n' span_id:1558) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.myr11.remote)" = z &&\n' span_id: 1559 ) (Token id:Id.Lit_Chars val:'\ttest "z$(git config branch.myr11.merge)" = z &&\n' span_id:1560) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.myr11.rebase)" = z\n' span_id: 1561 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'autosetuprebase unconfigured on untracked remote branch' span_id: 1568 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1572) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:1573) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 1574 ) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n' span_id: 1575 ) (Token id:Id.Lit_Chars val:'\tgit branch --no-track myr12 local/master &&\n' span_id:1576) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.myr12.remote)" = z &&\n' span_id: 1577 ) (Token id:Id.Lit_Chars val:'\ttest "z$(git config branch.myr12.merge)" = z &&\n' span_id:1578) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.myr12.rebase)" = z\n' span_id: 1579 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'autosetuprebase never on an untracked local branch' span_id: 1586 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1590) (Token id: Id.Lit_Chars val: '\tgit config branch.autosetuprebase never &&\n' span_id: 1591 ) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:1592) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 1593 ) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n' span_id: 1594 ) (Token id:Id.Lit_Chars val:'\tgit branch --no-track myr13 mybase2 &&\n' span_id:1595) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.myr13.remote)" = z &&\n' span_id: 1596 ) (Token id:Id.Lit_Chars val:'\ttest "z$(git config branch.myr13.merge)" = z &&\n' span_id:1597) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.myr13.rebase)" = z\n' span_id: 1598 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'autosetuprebase local on an untracked local branch' span_id: 1605 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1609) (Token id: Id.Lit_Chars val: '\tgit config branch.autosetuprebase local &&\n' span_id: 1610 ) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:1611) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 1612 ) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n' span_id: 1613 ) (Token id:Id.Lit_Chars val:'\tgit branch --no-track myr14 mybase2 &&\n' span_id:1614) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.myr14.remote)" = z &&\n' span_id: 1615 ) (Token id:Id.Lit_Chars val:'\ttest "z$(git config branch.myr14.merge)" = z &&\n' span_id:1616) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.myr14.rebase)" = z\n' span_id: 1617 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'autosetuprebase remote on an untracked local branch' span_id: 1624 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1628) (Token id: Id.Lit_Chars val: '\tgit config branch.autosetuprebase remote &&\n' span_id: 1629 ) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:1630) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 1631 ) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n' span_id: 1632 ) (Token id:Id.Lit_Chars val:'\tgit branch --no-track myr15 mybase2 &&\n' span_id:1633) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.myr15.remote)" = z &&\n' span_id: 1634 ) (Token id:Id.Lit_Chars val:'\ttest "z$(git config branch.myr15.merge)" = z &&\n' span_id:1635) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.myr15.rebase)" = z\n' span_id: 1636 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'autosetuprebase always on an untracked local branch' span_id: 1643 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1647) (Token id: Id.Lit_Chars val: '\tgit config branch.autosetuprebase always &&\n' span_id: 1648 ) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:1649) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 1650 ) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n' span_id: 1651 ) (Token id:Id.Lit_Chars val:'\tgit branch --no-track myr16 mybase2 &&\n' span_id:1652) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.myr16.remote)" = z &&\n' span_id: 1653 ) (Token id:Id.Lit_Chars val:'\ttest "z$(git config branch.myr16.merge)" = z &&\n' span_id:1654) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.myr16.rebase)" = z\n' span_id: 1655 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'autosetuprebase never on an untracked remote branch' span_id: 1662 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1666) (Token id: Id.Lit_Chars val: '\tgit config branch.autosetuprebase never &&\n' span_id: 1667 ) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:1668) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 1669 ) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n' span_id: 1670 ) (Token id:Id.Lit_Chars val:'\tgit branch --no-track myr17 local/master &&\n' span_id:1671) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.myr17.remote)" = z &&\n' span_id: 1672 ) (Token id:Id.Lit_Chars val:'\ttest "z$(git config branch.myr17.merge)" = z &&\n' span_id:1673) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.myr17.rebase)" = z\n' span_id: 1674 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'autosetuprebase local on an untracked remote branch' span_id: 1681 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1685) (Token id: Id.Lit_Chars val: '\tgit config branch.autosetuprebase local &&\n' span_id: 1686 ) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:1687) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 1688 ) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n' span_id: 1689 ) (Token id:Id.Lit_Chars val:'\tgit branch --no-track myr18 local/master &&\n' span_id:1690) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.myr18.remote)" = z &&\n' span_id: 1691 ) (Token id:Id.Lit_Chars val:'\ttest "z$(git config branch.myr18.merge)" = z &&\n' span_id:1692) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.myr18.rebase)" = z\n' span_id: 1693 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'autosetuprebase remote on an untracked remote branch' span_id: 1700 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1704) (Token id: Id.Lit_Chars val: '\tgit config branch.autosetuprebase remote &&\n' span_id: 1705 ) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:1706) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 1707 ) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n' span_id: 1708 ) (Token id:Id.Lit_Chars val:'\tgit branch --no-track myr19 local/master &&\n' span_id:1709) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.myr19.remote)" = z &&\n' span_id: 1710 ) (Token id:Id.Lit_Chars val:'\ttest "z$(git config branch.myr19.merge)" = z &&\n' span_id:1711) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.myr19.rebase)" = z\n' span_id: 1712 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'autosetuprebase always on an untracked remote branch' span_id: 1719 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1723) (Token id: Id.Lit_Chars val: '\tgit config branch.autosetuprebase always &&\n' span_id: 1724 ) (Token id:Id.Lit_Chars val:'\tgit config remote.local.url . &&\n' span_id:1725) (Token id: Id.Lit_Chars val: '\tgit config remote.local.fetch refs/heads/*:refs/remotes/local/* &&\n' span_id: 1726 ) (Token id: Id.Lit_Chars val: '\t(git show-ref -q refs/remotes/local/master || git fetch local) &&\n' span_id: 1727 ) (Token id:Id.Lit_Chars val:'\tgit branch --no-track myr20 local/master &&\n' span_id:1728) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.myr20.remote)" = z &&\n' span_id: 1729 ) (Token id:Id.Lit_Chars val:'\ttest "z$(git config branch.myr20.merge)" = z &&\n' span_id:1730) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.myr20.rebase)" = z\n' span_id: 1731 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'autosetuprebase always on detached HEAD' span_id:1738))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1742) (Token id: Id.Lit_Chars val: '\tgit config branch.autosetupmerge always &&\n' span_id: 1743 ) (Token id:Id.Lit_Chars val:'\ttest_when_finished git checkout master &&\n' span_id:1744) (Token id:Id.Lit_Chars val:'\tgit checkout HEAD^0 &&\n' span_id:1745) (Token id:Id.Lit_Chars val:'\tgit branch my11 &&\n' span_id:1746) (Token id: Id.Lit_Chars val: '\ttest -z "$(git config branch.my11.remote)" &&\n' span_id: 1747 ) (Token id:Id.Lit_Chars val:'\ttest -z "$(git config branch.my11.merge)"\n' span_id:1748) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'detect misconfigured autosetuprebase (bad value)' span_id: 1755 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1759) (Token id: Id.Lit_Chars val: '\tgit config branch.autosetuprebase garbage &&\n' span_id: 1760 ) (Token id:Id.Lit_Chars val:'\ttest_must_fail git branch\n' span_id:1761) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'detect misconfigured autosetuprebase (no value)' span_id: 1768 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1772) (Token id: Id.Lit_Chars val: '\tgit config --unset branch.autosetuprebase &&\n' span_id: 1773 ) (Token id:Id.Lit_Chars val:'\techo "[branch] autosetuprebase" >>.git/config &&\n' span_id:1774) (Token id:Id.Lit_Chars val:'\ttest_must_fail git branch &&\n' span_id:1775) (Token id:Id.Lit_Chars val:'\tgit config --unset branch.autosetuprebase\n' span_id:1776) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'attempt to delete a branch without base and unmerged to HEAD' span_id: 1783 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1787) (Token id:Id.Lit_Chars val:'\tgit checkout my9 &&\n' span_id:1788) (Token id:Id.Lit_Chars val:'\tgit config --unset branch.my8.merge &&\n' span_id:1789) (Token id:Id.Lit_Chars val:'\ttest_must_fail git branch -d my8\n' span_id:1790) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'attempt to delete a branch merged to its base' span_id:1797))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1801) (Token id: Id.Lit_Chars val: '\t# we are on my9 which is the initial commit; traditionally\n' span_id: 1802 ) (Token id: Id.Lit_Chars val: '\t# we would not have allowed deleting my8 that is not merged\n' span_id: 1803 ) (Token id: Id.Lit_Chars val: '\t# to my9, but it is set to track master that already has my8\n' span_id: 1804 ) (Token id:Id.Lit_Chars val:'\tgit config branch.my8.merge refs/heads/master &&\n' span_id:1805) (Token id:Id.Lit_Chars val:'\tgit branch -d my8\n' span_id:1806) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'attempt to delete a branch merged to its base' span_id:1813))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1817) (Token id:Id.Lit_Chars val:'\tgit checkout master &&\n' span_id:1818) (Token id:Id.Lit_Chars val:'\techo Third >>A &&\n' span_id:1819) (Token id:Id.Lit_Chars val:'\tgit commit -m "Third commit" A &&\n' span_id:1820) (Token id:Id.Lit_Chars val:'\tgit branch -t my10 my9 &&\n' span_id:1821) (Token id:Id.Lit_Chars val:'\tgit branch -f my10 HEAD^ &&\n' span_id:1822) (Token id: Id.Lit_Chars val: '\t# we are on master which is at the third commit, and my10\n' span_id: 1823 ) (Token id: Id.Lit_Chars val: '\t# is behind us, so traditionally we would have allowed deleting\n' span_id: 1824 ) (Token id: Id.Lit_Chars val: '\t# it; but my10 is set to track my9 that is further behind.\n' span_id: 1825 ) (Token id:Id.Lit_Chars val:'\ttest_must_fail git branch -d my10\n' span_id:1826) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'use set-upstream on the current branch' span_id:1833))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1837) (Token id:Id.Lit_Chars val:'\tgit checkout master &&\n' span_id:1838) (Token id:Id.Lit_Chars val:'\tgit --bare init myupstream.git &&\n' span_id:1839) (Token id: Id.Lit_Chars val: '\tgit push myupstream.git master:refs/heads/frotz &&\n' span_id: 1840 ) (Token id:Id.Lit_Chars val:'\tgit remote add origin myupstream.git &&\n' span_id:1841) (Token id:Id.Lit_Chars val:'\tgit fetch &&\n' span_id:1842) (Token id:Id.Lit_Chars val:'\tgit branch --set-upstream master origin/frotz &&\n' span_id:1843) (Token id:Id.Lit_Chars val:'\n' span_id:1844) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.master.remote)" = "zorigin" &&\n' span_id: 1845 ) (Token id: Id.Lit_Chars val: '\ttest "z$(git config branch.master.merge)" = "zrefs/heads/frotz"\n' span_id: 1846 ) (Token id:Id.Lit_Chars val:'\n' span_id:1847) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'use --edit-description' span_id:1854))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1858) (Token id:Id.Lit_Chars val:'\twrite_script editor <<-\\EOF &&\n' span_id:1859) (Token id:Id.Lit_Chars val:'\t\techo "New contents" >"$1"\n' span_id:1860) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:1861) (Token id:Id.Lit_Chars val:'\tEDITOR=./editor git branch --edit-description &&\n' span_id:1862) (Token id:Id.Lit_Chars val:'\t\twrite_script editor <<-\\EOF &&\n' span_id:1863) (Token id:Id.Lit_Chars val:'\t\tgit stripspace -s <"$1" >"EDITOR_OUTPUT"\n' span_id:1864) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:1865) (Token id:Id.Lit_Chars val:'\tEDITOR=./editor git branch --edit-description &&\n' span_id:1866) (Token id:Id.Lit_Chars val:'\techo "New contents" >expect &&\n' span_id:1867) (Token id:Id.Lit_Chars val:'\ttest_cmp EDITOR_OUTPUT expect\n' span_id:1868) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'detect typo in branch name when using --edit-description' span_id: 1875 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1879) (Token id:Id.Lit_Chars val:'\twrite_script editor <<-\\EOF &&\n' span_id:1880) (Token id:Id.Lit_Chars val:'\t\techo "New contents" >"$1"\n' span_id:1881) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:1882) (Token id: Id.Lit_Chars val: '\ttest_must_fail env EDITOR=./editor git branch --edit-description no-such-branch\n' span_id: 1883 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'refuse --edit-description on unborn branch for now' span_id: 1890 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1894) (Token id:Id.Lit_Chars val:'\twrite_script editor <<-\\EOF &&\n' span_id:1895) (Token id:Id.Lit_Chars val:'\t\techo "New contents" >"$1"\n' span_id:1896) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:1897) (Token id:Id.Lit_Chars val:'\tgit checkout --orphan unborn &&\n' span_id:1898) (Token id: Id.Lit_Chars val: '\ttest_must_fail env EDITOR=./editor git branch --edit-description\n' span_id: 1899 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'--merged catches invalid object names' span_id:1906))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1910) (Token id: Id.Lit_Chars val: '\ttest_must_fail git branch --merged 0000000000000000000000000000000000000000\n' span_id: 1911 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'tracking with unexpected .fetch refspec' span_id:1918))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1922) (Token id:Id.Lit_Chars val:'\trm -rf a b c d &&\n' span_id:1923) (Token id:Id.Lit_Chars val:'\tgit init a &&\n' span_id:1924) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1925) (Token id:Id.Lit_Chars val:'\t\tcd a &&\n' span_id:1926) (Token id:Id.Lit_Chars val:'\t\ttest_commit a\n' span_id:1927) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:1928) (Token id:Id.Lit_Chars val:'\tgit init b &&\n' span_id:1929) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1930) (Token id:Id.Lit_Chars val:'\t\tcd b &&\n' span_id:1931) (Token id:Id.Lit_Chars val:'\t\ttest_commit b\n' span_id:1932) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:1933) (Token id:Id.Lit_Chars val:'\tgit init c &&\n' span_id:1934) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1935) (Token id:Id.Lit_Chars val:'\t\tcd c &&\n' span_id:1936) (Token id:Id.Lit_Chars val:'\t\ttest_commit c &&\n' span_id:1937) (Token id:Id.Lit_Chars val:'\t\tgit remote add a ../a &&\n' span_id:1938) (Token id:Id.Lit_Chars val:'\t\tgit remote add b ../b &&\n' span_id:1939) (Token id:Id.Lit_Chars val:'\t\tgit fetch --all\n' span_id:1940) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:1941) (Token id:Id.Lit_Chars val:'\tgit init d &&\n' span_id:1942) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1943) (Token id:Id.Lit_Chars val:'\t\tcd d &&\n' span_id:1944) (Token id:Id.Lit_Chars val:'\t\tgit remote add c ../c &&\n' span_id:1945) (Token id: Id.Lit_Chars val: '\t\tgit config remote.c.fetch "+refs/remotes/*:refs/remotes/*" &&\n' span_id: 1946 ) (Token id:Id.Lit_Chars val:'\t\tgit fetch c &&\n' span_id:1947) (Token id: Id.Lit_Chars val: '\t\tgit branch --track local/a/master remotes/a/master &&\n' span_id: 1948 ) (Token id: Id.Lit_Chars val: '\t\ttest "$(git config branch.local/a/master.remote)" = "c" &&\n' span_id: 1949 ) (Token id: Id.Lit_Chars val: '\t\ttest "$(git config branch.local/a/master.merge)" = "refs/remotes/a/master" &&\n' span_id: 1950 ) (Token id:Id.Lit_Chars val:'\t\tgit rev-parse --verify a >expect &&\n' span_id:1951) (Token id: Id.Lit_Chars val: '\t\tgit rev-parse --verify local/a/master >actual &&\n' span_id: 1952 ) (Token id:Id.Lit_Chars val:'\t\ttest_cmp expect actual\n' span_id:1953) (Token id:Id.Lit_Chars val:'\t)\n' span_id:1954) ) } ) (C {(test_done)}) ] )