(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 <'git svn honors i18n.commitEncoding in config'>)} spids: [10] ) ] redirects: [] ) (C {<.>} {<'./lib-git-svn.sh'>}) (command.ShFunction name: compare_git_head_with body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'nr='> name:nr) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Simple words: [{<wc>} {<-l>}] redirects: [ (redir op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {(DQ ($ Id.VSub_Number 1))} ) ] more_env: [] do_fork: T ) right: <Id.Eof_RParen _> ) } spids: [29] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'a='> name:a) op: assign_op.Equal rhs: {<7>} spids: [43] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'b='> name:b) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: (arith_expr.Binary op_id: Id.Arith_Plus left: {($ Id.VSub_DollarName a)} right: {($ Id.VSub_DollarName nr)} ) right: {<Id.Lit_Digits 1>} ) ) } spids: [47] ) ] redirects: [] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Pipeline children: [ (C {<git>} {<cat-file>} {<commit>} {<HEAD>}) (command.Simple words: [ {<sed>} {<-ne>} {(DQ ($ Id.VSub_DollarName a) <','> (${ Id.VSub_Name b) <p>)} ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<current>} ) ] more_env: [] do_fork: T ) ] negated: F stderr_indices: [] ) (C {<test_cmp>} {<current>} {(DQ ($ Id.VSub_Number 1))}) ] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (C {<prepare_a_utf8_locale>}) (command.ShFunction name: compare_svn_head_with body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Pipeline children: [ (command.Simple words: [ {<svn>} {<log>} { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<git>} {<svn>} {<info>} {<--url>}) right: <Id.Eof_RParen _> ) } ] redirects: [] more_env: [ (env_pair name: LC_ALL val: {(DQ ($ Id.VSub_DollarName a_utf8_locale))} spids: [121] ) ] do_fork: T ) (command.Simple words: [ {<perl>} {<-w>} {<-e>} { (SQ <'\n'> <'\t\tuse bytes;\n'> <'\t\t$/ = ("-"x72) . "\\n";\n'> <'\t\tmy @x = <STDIN>;\n'> <'\t\t@x = split(/\\n/, $x[1]);\n'> <'\t\tsplice(@x, 0, 2);\n'> <'\t\t$x[-1] = "";\n'> <'\t\tprint join("\\n", @x);\n'> <'\t'> ) } ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<current>} ) ] more_env: [] do_fork: T ) ] negated: F stderr_indices: [] ) (C {<test_cmp>} {<current>} {(DQ ($ Id.VSub_Number 1))}) ] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ForEach iter_names: [H] iterable: (for_iter.Words words:[{<ISO8859-1>} {<eucJP>} {<ISO-2022-JP>}]) body: (command.DoGroup children: [ (C {<test_expect_success>} {(DQ ($ Id.VSub_DollarName H) <' setup'>)} { (SQ <'\n'> <'\t\tmkdir $H &&\n'> <'\t\tsvn_cmd import -m "$H test" $H "$svnrepo"/$H &&\n'> <'\t\tgit svn clone "$svnrepo"/$H $H\n'> <'\t'> ) } ) ] ) redirects: [] ) (command.ForEach iter_names: [H] iterable: (for_iter.Words words:[{<ISO8859-1>} {<eucJP>} {<ISO-2022-JP>}]) body: (command.DoGroup children: [ (C {<test_expect_success>} {(DQ ($ Id.VSub_DollarName H) <' commit on git side'>)} { (SQ <'\n'> <'\t(\n'> <'\t\tcd $H &&\n'> <'\t\tgit config i18n.commitencoding $H &&\n'> <'\t\tgit checkout -b t refs/remotes/git-svn &&\n'> <'\t\techo $H >F &&\n'> <'\t\tgit add F &&\n'> <'\t\tgit commit -a -F "$TEST_DIRECTORY"/t3900/$H.txt &&\n'> <'\t\tE=$(git cat-file commit HEAD | sed -ne "s/^encoding //p") &&\n'> <'\t\ttest "z$E" = "z$H"\n'> <'\t\tcompare_git_head_with "$TEST_DIRECTORY"/t3900/$H.txt\n'> <'\t)\n'> <'\t'> ) } ) ] ) redirects: [] ) (command.ForEach iter_names: [H] iterable: (for_iter.Words words:[{<ISO8859-1>} {<eucJP>} {<ISO-2022-JP>}]) body: (command.DoGroup children: [ (C {<test_expect_success>} {(DQ ($ Id.VSub_DollarName H) <' dcommit to svn'>)} { (SQ <'\n'> <'\t(\n'> <'\t\tcd $H &&\n'> <'\t\tgit svn dcommit &&\n'> <'\t\tgit cat-file commit HEAD | grep git-svn-id: &&\n'> <'\t\tE=$(git cat-file commit HEAD | sed -ne "s/^encoding //p") &&\n'> <'\t\ttest "z$E" = "z$H" &&\n'> <'\t\tcompare_git_head_with "$TEST_DIRECTORY"/t3900/$H.txt\n'> <'\t)\n'> <'\t'> ) } ) ] ) redirects: [] ) (C {<test_expect_success>} {<UTF8>} {(SQ <'ISO-8859-1 should match UTF-8 in svn'>)} { (SQ <'\n'> <'\t(\n'> <'\t\tcd ISO8859-1 &&\n'> <'\t\tcompare_svn_head_with "$TEST_DIRECTORY"/t3900/1-UTF-8.txt\n'> <'\t)\n'> ) } ) (command.ForEach iter_names: [H] iterable: (for_iter.Words words:[{<eucJP>} {<ISO-2022-JP>}]) body: (command.DoGroup children: [ (C {<test_expect_success>} {<UTF8>} {(DQ ($ Id.VSub_DollarName H) <' should match UTF-8 in svn'>)} { (SQ <'\n'> <'\t\t(\n'> <'\t\t\tcd $H &&\n'> <'\t\t\tcompare_svn_head_with "$TEST_DIRECTORY"/t3900/2-UTF-8.txt\n'> <'\t\t)\n'> <'\t'> ) } ) ] ) redirects: [] ) (C {<test_done>}) ] )