(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 rebase tests for -Xsubtree\n' span_id:6) (Token id:Id.Lit_Chars val:'\n' span_id:7) (Token id:Id.Lit_Chars val:'This test runs git rebase and tests the subtree strategy.\n' span_id:8) ) } spids: [4] ) ] ) (C {(.)} {(./test-lib.sh)}) (C {(.)} {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY')) (/lib-rebase.sh)}) (command.ShFunction name: commit_message body: (command.BraceGroup children: [ (C {(git)} {(log)} {(--pretty) (Id.Lit_Equals '=') (format) (Id.Lit_Other ':') (Id.Lit_Other '%') (s)} {(-1)} {(DQ ($ Id.VSub_Number '$1'))} ) ] ) ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:setup span_id:53))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:57) (Token id:Id.Lit_Chars val:'\ttest_commit README &&\n' span_id:58) (Token id:Id.Lit_Chars val:'\tmkdir files &&\n' span_id:59) (Token id:Id.Lit_Chars val:'\t(\n' span_id:60) (Token id:Id.Lit_Chars val:'\t\tcd files &&\n' span_id:61) (Token id:Id.Lit_Chars val:'\t\tgit init &&\n' span_id:62) (Token id:Id.Lit_Chars val:'\t\ttest_commit master1 &&\n' span_id:63) (Token id:Id.Lit_Chars val:'\t\ttest_commit master2 &&\n' span_id:64) (Token id:Id.Lit_Chars val:'\t\ttest_commit master3\n' span_id:65) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:66) (Token id:Id.Lit_Chars val:'\tgit fetch files master &&\n' span_id:67) (Token id: Id.Lit_Chars val: '\tgit branch files-master FETCH_HEAD &&\n' span_id: 68 ) (Token id:Id.Lit_Chars val:'\tgit read-tree --prefix=files_subtree files-master &&\n' span_id:69) (Token id:Id.Lit_Chars val:'\tgit checkout -- files_subtree &&\n' span_id:70) (Token id:Id.Lit_Chars val:'\ttree=$(git write-tree) &&\n' span_id:71) (Token id:Id.Lit_Chars val:'\thead=$(git rev-parse HEAD) &&\n' span_id:72) (Token id:Id.Lit_Chars val:'\trev=$(git rev-parse --verify files-master^0) &&\n' span_id:73) (Token id: Id.Lit_Chars val: '\tcommit=$(git commit-tree -p $head -p $rev -m "Add subproject master" $tree) &&\n' span_id: 74 ) (Token id:Id.Lit_Chars val:'\tgit update-ref HEAD $commit &&\n' span_id:75) (Token id:Id.Lit_Chars val:'\t(\n' span_id:76) (Token id:Id.Lit_Chars val:'\t\tcd files_subtree &&\n' span_id:77) (Token id:Id.Lit_Chars val:'\t\ttest_commit master4\n' span_id:78) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:79) (Token id:Id.Lit_Chars val:'\ttest_commit files_subtree/master5\n' span_id:80) ) } ) (C {(test_expect_failure)} { (SQ (Token id: Id.Lit_Chars val: 'Rebase -Xsubtree --preserve-merges --onto commit 4' span_id: 90 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:94) (Token id:Id.Lit_Chars val:'\treset_rebase &&\n' span_id:95) (Token id:Id.Lit_Chars val:'\tgit checkout -b rebase-preserve-merges-4 master &&\n' span_id:96) (Token id: Id.Lit_Chars val: '\tgit filter-branch --prune-empty -f --subdirectory-filter files_subtree &&\n' span_id: 97 ) (Token id:Id.Lit_Chars val:'\tgit commit -m "Empty commit" --allow-empty &&\n' span_id:98) (Token id: Id.Lit_Chars val: '\tgit rebase -Xsubtree=files_subtree --preserve-merges --onto files-master master &&\n' span_id: 99 ) (Token id: Id.Lit_Chars val: '\tverbose test "$(commit_message HEAD~)" = "files_subtree/master4"\n' span_id: 100 ) ) } ) (C {(test_expect_failure)} { (SQ (Token id: Id.Lit_Chars val: 'Rebase -Xsubtree --preserve-merges --onto commit 5' span_id: 110 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:114) (Token id:Id.Lit_Chars val:'\treset_rebase &&\n' span_id:115) (Token id:Id.Lit_Chars val:'\tgit checkout -b rebase-preserve-merges-5 master &&\n' span_id:116) (Token id: Id.Lit_Chars val: '\tgit filter-branch --prune-empty -f --subdirectory-filter files_subtree &&\n' span_id: 117 ) (Token id:Id.Lit_Chars val:'\tgit commit -m "Empty commit" --allow-empty &&\n' span_id:118) (Token id: Id.Lit_Chars val: '\tgit rebase -Xsubtree=files_subtree --preserve-merges --onto files-master master &&\n' span_id: 119 ) (Token id: Id.Lit_Chars val: '\tverbose test "$(commit_message HEAD)" = "files_subtree/master5"\n' span_id: 120 ) ) } ) (C {(test_expect_failure)} { (SQ (Token id: Id.Lit_Chars val: 'Rebase -Xsubtree --keep-empty --preserve-merges --onto commit 4' span_id: 130 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:134) (Token id:Id.Lit_Chars val:'\treset_rebase &&\n' span_id:135) (Token id:Id.Lit_Chars val:'\tgit checkout -b rebase-keep-empty-4 master &&\n' span_id:136) (Token id: Id.Lit_Chars val: '\tgit filter-branch --prune-empty -f --subdirectory-filter files_subtree &&\n' span_id: 137 ) (Token id:Id.Lit_Chars val:'\tgit commit -m "Empty commit" --allow-empty &&\n' span_id:138) (Token id: Id.Lit_Chars val: '\tgit rebase -Xsubtree=files_subtree --keep-empty --preserve-merges --onto files-master master &&\n' span_id: 139 ) (Token id: Id.Lit_Chars val: '\tverbose test "$(commit_message HEAD~2)" = "files_subtree/master4"\n' span_id: 140 ) ) } ) (C {(test_expect_failure)} { (SQ (Token id: Id.Lit_Chars val: 'Rebase -Xsubtree --keep-empty --preserve-merges --onto commit 5' span_id: 150 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:154) (Token id:Id.Lit_Chars val:'\treset_rebase &&\n' span_id:155) (Token id:Id.Lit_Chars val:'\tgit checkout -b rebase-keep-empty-5 master &&\n' span_id:156) (Token id: Id.Lit_Chars val: '\tgit filter-branch --prune-empty -f --subdirectory-filter files_subtree &&\n' span_id: 157 ) (Token id:Id.Lit_Chars val:'\tgit commit -m "Empty commit" --allow-empty &&\n' span_id:158) (Token id: Id.Lit_Chars val: '\tgit rebase -Xsubtree=files_subtree --keep-empty --preserve-merges --onto files-master master &&\n' span_id: 159 ) (Token id: Id.Lit_Chars val: '\tverbose test "$(commit_message HEAD~)" = "files_subtree/master5"\n' span_id: 160 ) ) } ) (C {(test_expect_failure)} { (SQ (Token id: Id.Lit_Chars val: 'Rebase -Xsubtree --keep-empty --preserve-merges --onto empty commit' span_id: 170 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:174) (Token id:Id.Lit_Chars val:'\treset_rebase &&\n' span_id:175) (Token id:Id.Lit_Chars val:'\tgit checkout -b rebase-keep-empty-empty master &&\n' span_id:176) (Token id: Id.Lit_Chars val: '\tgit filter-branch --prune-empty -f --subdirectory-filter files_subtree &&\n' span_id: 177 ) (Token id:Id.Lit_Chars val:'\tgit commit -m "Empty commit" --allow-empty &&\n' span_id:178) (Token id: Id.Lit_Chars val: '\tgit rebase -Xsubtree=files_subtree --keep-empty --preserve-merges --onto files-master master &&\n' span_id: 179 ) (Token id:Id.Lit_Chars val:'\tverbose test "$(commit_message HEAD)" = "Empty commit"\n' span_id:180) ) } ) (C {(test_expect_failure)} {(SQ (Token id:Id.Lit_Chars val:'Rebase -Xsubtree --onto commit 4' span_id:190))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:194) (Token id:Id.Lit_Chars val:'\treset_rebase &&\n' span_id:195) (Token id:Id.Lit_Chars val:'\tgit checkout -b rebase-onto-4 master &&\n' span_id:196) (Token id: Id.Lit_Chars val: '\tgit filter-branch --prune-empty -f --subdirectory-filter files_subtree &&\n' span_id: 197 ) (Token id:Id.Lit_Chars val:'\tgit commit -m "Empty commit" --allow-empty &&\n' span_id:198) (Token id: Id.Lit_Chars val: '\tgit rebase -Xsubtree=files_subtree --onto files-master master &&\n' span_id: 199 ) (Token id: Id.Lit_Chars val: '\tverbose test "$(commit_message HEAD~2)" = "files_subtree/master4"\n' span_id: 200 ) ) } ) (C {(test_expect_failure)} {(SQ (Token id:Id.Lit_Chars val:'Rebase -Xsubtree --onto commit 5' span_id:210))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:214) (Token id:Id.Lit_Chars val:'\treset_rebase &&\n' span_id:215) (Token id:Id.Lit_Chars val:'\tgit checkout -b rebase-onto-5 master &&\n' span_id:216) (Token id: Id.Lit_Chars val: '\tgit filter-branch --prune-empty -f --subdirectory-filter files_subtree &&\n' span_id: 217 ) (Token id:Id.Lit_Chars val:'\tgit commit -m "Empty commit" --allow-empty &&\n' span_id:218) (Token id: Id.Lit_Chars val: '\tgit rebase -Xsubtree=files_subtree --onto files-master master &&\n' span_id: 219 ) (Token id: Id.Lit_Chars val: '\tverbose test "$(commit_message HEAD~)" = "files_subtree/master5"\n' span_id: 220 ) ) } ) (C {(test_expect_failure)} {(SQ (Token id:Id.Lit_Chars val:'Rebase -Xsubtree --onto empty commit' span_id:229))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:233) (Token id:Id.Lit_Chars val:'\treset_rebase &&\n' span_id:234) (Token id:Id.Lit_Chars val:'\tgit checkout -b rebase-onto-empty master &&\n' span_id:235) (Token id: Id.Lit_Chars val: '\tgit filter-branch --prune-empty -f --subdirectory-filter files_subtree &&\n' span_id: 236 ) (Token id:Id.Lit_Chars val:'\tgit commit -m "Empty commit" --allow-empty &&\n' span_id:237) (Token id: Id.Lit_Chars val: '\tgit rebase -Xsubtree=files_subtree --onto files-master master &&\n' span_id: 238 ) (Token id:Id.Lit_Chars val:'\tverbose test "$(commit_message HEAD)" = "Empty commit"\n' span_id:239) ) } ) (C {(test_done)}) ] )