(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:test_description) op: Equal rhs: {(SQ <'git svn commit-diff'>)} ) ] ) (C {(.)} {(./lib-git-svn.sh)}) (C {(test_expect_success)} {(SQ <'initialize repo'>)} { (SQ <'\n'> <'\tmkdir import &&\n'> <'\t(\n'> <'\t\tcd import &&\n'> <'\t\techo hello >readme &&\n'> <'\t\tsvn_cmd import -m "initial" . "$svnrepo"\n'> <'\t) &&\n'> <'\techo hello > readme &&\n'> <'\tgit update-index --add readme &&\n'> <'\tgit commit -a -m "initial" &&\n'> <'\techo world >> readme &&\n'> <'\tgit commit -a -m "another"\n'> <'\t'> ) } ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:head) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(rev-parse)} {(--verify)} {(HEAD) (Lit_Other '^') (0)})] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:prev) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(git)} {(rev-parse)} {(--verify)} {(HEAD) (Lit_Other '^') (1)})] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (C {(test_expect_success)} {(SQ <'test the commit-diff command'>)} { (SQ <'\n'> <'\ttest -n "$prev" && test -n "$head" &&\n'> <'\tgit svn commit-diff -r1 "$prev" "$head" "$svnrepo" &&\n'> <'\tsvn_cmd co "$svnrepo" wc &&\n'> <'\tcmp readme wc/readme\n'> <'\t'> ) } ) (C {(test_expect_success)} {(SQ <'commit-diff to a sub-directory (with git svn config)'>)} { (SQ <'\n'> <'\tsvn_cmd import -m "sub-directory" import "$svnrepo"/subdir &&\n'> <'\tgit svn init --minimize-url "$svnrepo"/subdir &&\n'> <'\tgit svn fetch &&\n'> <'\tgit svn commit-diff -r3 "$prev" "$head" &&\n'> <'\tsvn_cmd cat "$svnrepo"/subdir/readme > readme.2 &&\n'> <'\tcmp readme readme.2\n'> <'\t'> ) } ) (C {(test_done)}) ] )