(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:dashless) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:17) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(basename)} {(DQ ($ Id.VSub_Number '$0'))}) (C {(sed)} {(-e)} {(SQ (Token id:Id.Lit_Chars val:'s/-/ /' span_id:31))}) ] negated: F ) ] ) ) } spids: [16] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:USAGE) op: assign_op.Equal rhs: { (DQ ( '[--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]\n' ) (' or: ') ($ Id.VSub_DollarName '$dashless') (' [--quiet] status [--cached] [--recursive] [--] [<path>...]\n') (' or: ') ($ Id.VSub_DollarName '$dashless') (' [--quiet] init [--] [<path>...]\n') (' or: ') ($ Id.VSub_DollarName '$dashless') (' [--quiet] deinit [-f|--force] (--all| [--] <path>...)\n') (' or: ') ($ Id.VSub_DollarName '$dashless') ( ' [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--[no-]recommend-shallow] [--reference <repository>] [--recursive] [--] [<path>...]\n' ) (' or: ') ($ Id.VSub_DollarName '$dashless') ( ' [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]\n' ) (' or: ') ($ Id.VSub_DollarName '$dashless') (' [--quiet] foreach [--recursive] <command>\n') (' or: ') ($ Id.VSub_DollarName '$dashless') (' [--quiet] sync [--recursive] [--] [<path>...]') ) } spids: [35] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OPTIONS_SPEC) op: assign_op.Equal rhs: (word.Empty) spids: [61] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SUBDIRECTORY_OK) op: assign_op.Equal rhs: {(Yes)} spids: [63] ) ] ) (C {(.)} {(git-sh-setup)}) (C {(.)} {(git-parse-remote)}) (C {(require_work_tree)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:wt_prefix) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:77) command_list: (command.CommandList children: [(C {(git)} {(rev-parse)} {(--show-prefix)})] ) ) } spids: [76] ) ] ) (C {(cd_to_toplevel)}) (C {(Id.Lit_Other ':')} { (braced_var_sub token: (Token id:Id.VSub_Name val:GIT_ALLOW_PROTOCOL span_id:109) suffix_op: (suffix_op.Unary op_id:Id.VTest_Equals arg_word:{('file:git:http:https:ssh')}) ) } ) (C {(export)} {(GIT_ALLOW_PROTOCOL)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:command) op: assign_op.Equal rhs: (word.Empty) spids: [119] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:branch) op: assign_op.Equal rhs: (word.Empty) spids: [121] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:force) op: assign_op.Equal rhs: (word.Empty) spids: [123] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:reference) op: assign_op.Equal rhs: (word.Empty) spids: [125] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cached) op: assign_op.Equal rhs: (word.Empty) spids: [127] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:recursive) op: assign_op.Equal rhs: (word.Empty) spids: [129] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:init) op: assign_op.Equal rhs: (word.Empty) spids: [131] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:files) op: assign_op.Equal rhs: (word.Empty) spids: [133] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:remote) op: assign_op.Equal rhs: (word.Empty) spids: [135] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:nofetch) op: assign_op.Equal rhs: (word.Empty) spids: [137] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:update) op: assign_op.Equal rhs: (word.Empty) spids: [139] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:prefix) op: assign_op.Equal rhs: (word.Empty) spids: [141] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:custom_name) op: assign_op.Equal rhs: (word.Empty) spids: [143] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:depth) op: assign_op.Equal rhs: (word.Empty) spids: [145] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:progress) op: assign_op.Equal rhs: (word.Empty) spids: [147] ) ] ) (command.ShFunction name: die_if_unmatched body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (C {(test)} {(DQ ($ Id.VSub_Number '$1'))} {(Id.Lit_Equals '=')} {(DQ ('#unmatched'))}) ] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:176) arg_word: { (braced_var_sub token: (Token id:Id.VSub_Number val:2 span_id:179) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{(1)}) ) } ) ] spids: [158 173] ) ] ) ] ) ) (command.ShFunction name: get_submodule_config body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:name) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [237] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:option) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$2'))} spids: [243] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:default) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$3'))} spids: [249] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:value) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:256) command_list: (command.CommandList children: [ (C {(git)} {(config)} {(submodule.) (DQ ($ Id.VSub_DollarName '$name')) (.) (DQ ($ Id.VSub_DollarName '$option')) } ) ] ) ) } spids: [255] ) ] ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$value'))})] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:value) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:287) command_list: (command.CommandList children: [ (C {(git)} {(config)} {(-f)} {(.gitmodules)} {(submodule.) (DQ ($ Id.VSub_DollarName '$name')) (.) (DQ ($ Id.VSub_DollarName '$option')) } ) ] ) ) } spids: [286] ) ] ) ] spids: [272 283] ) ] ) (C {(printf)} {(SQ (Token id:Id.Lit_Chars val:'%s' span_id:313))} { (DQ (braced_var_sub token: (Token id:Id.VSub_Name val:value span_id:318) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonHyphen arg_word: {($ Id.VSub_DollarName '$default')} ) ) ) } ) ] ) ) (command.ShFunction name: isnumber body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:n) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.ArithWord w:{($ Id.VSub_Number '$1')}) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) ) ) } spids: [334] ) ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:344) fd: 2 arg_word: {(/dev/null)} ) ] ) (C {(test)} {(DQ ($ Id.VSub_DollarName '$n'))} {(Id.Lit_Equals '=')} {(DQ ($ Id.VSub_Number '$1'))} ) ] ) ] ) ) (command.ShFunction name: sanitize_submodule_env body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:save_config) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$GIT_CONFIG_PARAMETERS')} spids: [380] ) ] ) (C {(clear_local_git_env)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_CONFIG_PARAMETERS) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$save_config')} spids: [387] ) ] ) (C {(export)} {(GIT_CONFIG_PARAMETERS)}) ] ) ) (command.ShFunction name: cmd_add body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:reference_path) op: assign_op.Equal rhs: (word.Empty) spids: [430] ) ] ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:433) cond: [(C {(test)} {($ Id.VSub_Pound '$#')} {(-ne)} {(0)})] body: (command.DoGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(-b)} {(--branch)}] action: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$2'))} arms: [ (case_arm pat_list: [{(SQ )}] action: [(C {(usage)})] spids: [472 474 478 -1] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:branch) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [483] ) ] ) (C {(shift)}) ] spids: [456 461 490 -1] ) (case_arm pat_list: [{(-f)} {(--force)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:force) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [501] ) ] ) ] spids: [493 498 505 -1] ) (case_arm pat_list: [{(-q)} {(--quiet)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_QUIET) op: assign_op.Equal rhs: {(1)} spids: [514] ) ] ) ] spids: [508 511 518 -1] ) (case_arm pat_list: [{(--reference)}] action: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$2'))} arms: [ (case_arm pat_list: [{(SQ )}] action: [(C {(usage)})] spids: [533 535 539 -1] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:reference_path) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [544] ) ] ) (C {(shift)}) ] spids: [521 522 551 -1] ) (case_arm pat_list: [{(--reference) (Id.Lit_Equals '=') (Id.Lit_Star '*')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:reference_path) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:563) suffix_op: (suffix_op.Unary op_id: Id.VOp1_Pound arg_word: {('--reference=')} ) ) ) } spids: [560] ) ] ) ] spids: [554 557 570 -1] ) (case_arm pat_list: [{(--name)}] action: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$2'))} arms: [ (case_arm pat_list: [{(SQ )}] action: [(C {(usage)})] spids: [585 587 591 -1] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:custom_name) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [596] ) ] ) (C {(shift)}) ] spids: [573 574 603 -1] ) (case_arm pat_list: [{(--depth)}] action: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$2'))} arms: [ (case_arm pat_list: [{(SQ )}] action: [(C {(usage)})] spids: [618 620 624 -1] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:depth) op: assign_op.Equal rhs: {(DQ ('--depth=') ($ Id.VSub_Number '$2'))} spids: [629] ) ] ) (C {(shift)}) ] spids: [606 607 639 -1] ) (case_arm pat_list: [{(--depth) (Id.Lit_Equals '=') (Id.Lit_Star '*')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:depth) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [648] ) ] ) ] spids: [642 645 652 -1] ) (case_arm pat_list: [{(--)}] action: [ (C {(shift)}) (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:662) ) ] spids: [655 656 665 -1] ) (case_arm pat_list: [{(-) (Id.Lit_Star '*')}] action: [(C {(usage)})] spids: [668 670 676 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:683) ) ] spids: [679 680 686 -1] ) ] ) (C {(shift)}) ] ) ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$reference_path'))})] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(is_absolute_path)} {(DQ ($ Id.VSub_DollarName '$reference_path'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:reference_path) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$wt_prefix') ($ Id.VSub_DollarName '$reference_path') ) } spids: [722] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:reference) op: assign_op.Equal rhs: {(DQ ('--reference=') ($ Id.VSub_DollarName '$reference_path'))} spids: [730] ) ] ) ] spids: [699 710] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:repo) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [741] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sm_path) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [745] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$sm_path'))}) terminator: (Token id:Id.Op_Semi val:';' span_id:759) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sm_path) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:765) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(printf)} {(SQ (Token id:Id.Lit_Chars val:'%s\\n' span_id:769))} {(DQ ($ Id.VSub_DollarName '$repo'))} ) (C {(sed)} {(-e)} {(SQ (Token id:Id.Lit_Chars val:'s|/$||' span_id:784))} {(-e)} {(SQ (Token id:Id.Lit_Chars val:'s|:*/*\\.git$||' span_id:790))} {(-e)} { (SQ (Token id: Id.Lit_Chars val: 's|.*[/:]||g' span_id: 796 ) ) } ) ] negated: F ) ] ) ) } spids: [764] ) ] ) ] spids: [750 761] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$repo'))}) (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$sm_path'))}) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:824) ) ] action: [(C {(usage)})] spids: [805 826] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(is_absolute_path)} {(DQ ($ Id.VSub_DollarName '$sm_path'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sm_path) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$wt_prefix') ($ Id.VSub_DollarName '$sm_path'))} spids: [844] ) ] ) ] ) (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$repo'))} arms: [ (case_arm pat_list: [{(./) (Id.Lit_Star '*')} {(../) (Id.Lit_Star '*')}] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$wt_prefix'))}) (C {(die)} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:887) command_list: (command.CommandList children: [ (C {(gettext)} { (DQ ( 'Relative path can only be used from the toplevel of the working tree' ) ) } ) ] ) ) ) } ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:realrepo) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:903) command_list: (command.CommandList children: [ (C {(git)} {(submodule--helper)} {(resolve-relative-url)} {(DQ ($ Id.VSub_DollarName '$repo'))} ) ] ) ) } spids: [902] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:917) ) ] ) ] spids: [865 870 920 -1] ) (case_arm pat_list: [ {(Id.Lit_Star '*') (Id.Lit_Other ':') (Id.Lit_Star '*')} {(/) (Id.Lit_Star '*')} ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:realrepo) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$repo')} spids: [936] ) ] ) ] spids: [923 929 940 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (C {(die)} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:950) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("repo URL: '") (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:955) ) ("repo' must be absolute or begin with ./|../") ) } ) ] ) ) ) } ) ] spids: [943 944 962 -1] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sm_path) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:978) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(printf)} {(SQ (Token id:Id.Lit_Chars val:'%s/\\n' span_id:982))} {(DQ ($ Id.VSub_DollarName '$sm_path'))} ) (C {(sed)} {(-e)} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:997) (Token id: Id.Lit_Chars val: '\t\t\ts|//*|/|g\n' span_id: 998 ) (Token id:Id.Lit_Chars val:'\t\t\ts|^\\(\\./\\)*||\n' span_id:999) (Token id: Id.Lit_Chars val: '\t\t\ts|/\\(\\./\\)*|/|g\n' span_id: 1000 ) (Token id:Id.Lit_Chars val:'\t\t\t:start\n' span_id:1001) (Token id: Id.Lit_Chars val: '\t\t\ts|\\([^/]*\\)/\\.\\./||\n' span_id: 1002 ) (Token id:Id.Lit_Chars val:'\t\t\ttstart\n' span_id:1003) (Token id: Id.Lit_Chars val: '\t\t\ts|/*$||\n' span_id: 1004 ) (Token id:Id.Lit_Chars val:'\t\t' span_id:1005) ) } ) ] negated: F ) ] ) ) } spids: [977] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [ {(git)} {(ls-files)} {(--error-unmatch)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1020) fd: -1 arg_word: {(/dev/null)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:1024) fd: 2 arg_word: {(1)} ) ] ) (C {(die)} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1033) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("'") (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:1038) ) ("sm_path' already exists in the index") ) } ) ] ) ) ) } ) ] ) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$force'))}) (command.Pipeline children: [ (command.Simple words: [ {(git)} {(add)} {(--dry-run)} {(--ignore-missing)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:1072) fd: -1 arg_word: {(/dev/null)} ) (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'2>&' span_id:1076) fd: 2 arg_word: {(1)} ) ] ) ] negated: T ) ] ) ] action: [ (command.Simple words: [ {(eval_gettextln)} { (DQ ('The following path is ignored by one of your .gitignore files:\n') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:1087) ) ('sm_path\n') ('Use -f if you really want to add it.') ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:1092) fd: -1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:1096) arg_word: {(1)} ) ] spids: [1046 1080] ) ] ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$custom_name'))})] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sm_name) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$custom_name'))} spids: [1119] ) ] ) ] spids: [1105 1116] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sm_name) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$sm_path'))} spids: [1128] ) ] ) ] ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-e)} {(DQ ($ Id.VSub_DollarName '$sm_path'))})] action: [ (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(test)} {(-d)} {(DQ ($ Id.VSub_DollarName '$sm_path')) (/.git)}) (C {(test)} {(-f)} {(DQ ($ Id.VSub_DollarName '$sm_path')) (/.git)}) ] ) ] action: [ (C {(eval_gettextln)} { (DQ ("Adding existing repo at '") (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:1186) ) ("sm_path' to the index") ) } ) ] spids: [1156 1179] ) ] else_action: [ (C {(die)} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1197) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("'") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 1202 ) ) ("sm_path' already exists and is not a valid git repo") ) } ) ] ) ) ) } ) ] ) ] spids: [1142 1153] ) ] else_action: [ (command.If arms: [ (if_arm cond: [ (C {(test)} {(-d)} {(DQ (.git/modules/) ($ Id.VSub_DollarName '$sm_name'))}) ] action: [ (command.If arms: [ (if_arm cond: [(C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$force'))})] action: [ (command.Simple words: [ {(eval_gettextln)} { (DQ ("A git directory for '") (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:1252) ) ("sm_name' is found locally with remote(s):") ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:1247) fd: -1 arg_word: {(2)} ) ] ) (command.Pipeline children: [ (command.Simple words: [{(git)} {(remote)} {(-v)}] more_env: [ (env_pair name: GIT_DIR val: {(DQ (.git/modules/) ($ Id.VSub_DollarName '$sm_name'))} spids: [1257] ) (env_pair name: GIT_WORK_TREE val: {(.)} spids: [1263] ) ] ) (C {(grep)} {(SQ (Token id:Id.Lit_Chars val:'(fetch)' span_id:1277))} ) (command.Simple words: [ {(sed)} {(-e)} {(s) (Id.Lit_Comma ',') (Id.Lit_Other '^') (Id.Lit_Comma ',') (DQ (' ')) (Id.Lit_Comma ',') } {(-e)} {(s) (Id.Lit_Comma ',') (SQ (Token id:Id.Lit_Chars val:' (fetch)' span_id:1300)) (Id.Lit_Comma ',') (Id.Lit_Comma ',') } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:1305) fd: -1 arg_word: {(2)} ) ] ) ] negated: F ) (C {(die)} { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 1312 ) command_list: (command.CommandList children: [ (C {(eval_gettextln)} { (DQ ( 'If you want to reuse this local git directory instead of cloning again from\n' ) (' ') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:1319)) ('realrepo\n') ("use the '--force' option. If the local git directory is not the correct repo\n") ( "or you are unsure what this means choose another name with the '--name' option." ) ) } ) ] ) ) ) } ) ] spids: [1231 1242] ) ] else_action: [ (C {(eval_gettextln)} { (DQ ("Reactivating local git directory for submodule '") (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:1335) ) ("sm_name'.") ) } ) ] ) ] spids: [1216 1228] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(git)} {(submodule--helper)} {(clone)} { (braced_var_sub token: (Token id:Id.VSub_Name val:GIT_QUIET span_id:1353) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonPlus arg_word:{(--quiet)}) ) } {(--prefix)} {(DQ ($ Id.VSub_DollarName '$wt_prefix'))} {(--path)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} {(--name)} {(DQ ($ Id.VSub_DollarName '$sm_name'))} {(--url)} {(DQ ($ Id.VSub_DollarName '$realrepo'))} { (braced_var_sub token: (Token id:Id.VSub_Name val:reference span_id:1383) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {(DQ ($ Id.VSub_DollarName '$reference'))} ) ) } { (braced_var_sub token: (Token id:Id.VSub_Name val:depth span_id:1391) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {(DQ ($ Id.VSub_DollarName '$depth'))} ) ) } ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:1400) ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Subshell command_list: (command.CommandList children: [ (C {(sanitize_submodule_env)}) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(cd)} {(DQ ($ Id.VSub_DollarName '$sm_path'))}) (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$branch'))} arms: [ (case_arm pat_list: [{(SQ )}] action: [(C {(git)} {(checkout)} {(-f)} {(-q)})] spids: [1431 1433 1443 -1] ) (case_arm pat_list: [{(Id.Lit_QMark '?') (Id.Lit_Star '*')}] action: [ (C {(git)} {(checkout)} {(-f)} {(-q)} {(-B)} {(DQ ($ Id.VSub_DollarName '$branch'))} {(DQ (origin/) ($ Id.VSub_DollarName '$branch'))} ) ] spids: [1446 1448 1469 -1] ) ] ) ] ) ] ) ) (C {(die)} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1482) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Unable to checkout submodule '") (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:1487) ) ("sm_path'") ) } ) ] ) ) ) } ) ] ) ] ) (C {(git)} {(config)} {(submodule.) (DQ ($ Id.VSub_DollarName '$sm_name')) (.url)} {(DQ ($ Id.VSub_DollarName '$realrepo'))} ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(git)} {(add)} {($ Id.VSub_DollarName '$force')} {(DQ ($ Id.VSub_DollarName '$sm_path'))} ) (C {(die)} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1529) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Failed to add submodule '") (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:1534) ) ("sm_path'") ) } ) ] ) ) ) } ) ] ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DPipe] children: [ (C {(git)} {(config)} {(-f)} {(.gitmodules)} {(submodule.) (DQ ($ Id.VSub_DollarName '$sm_name')) (.path)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} ) (C {(git)} {(config)} {(-f)} {(.gitmodules)} {(submodule.) (DQ ($ Id.VSub_DollarName '$sm_name')) (.url)} {(DQ ($ Id.VSub_DollarName '$repo'))} ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$branch'))})] action: [ (C {(git)} {(config)} {(-f)} {(.gitmodules)} {(submodule.) (DQ ($ Id.VSub_DollarName '$sm_name')) (.branch)} {(DQ ($ Id.VSub_DollarName '$branch'))} ) ] spids: [1584 1595] ) ] ) (C {(git)} {(add)} {(--force)} {(.gitmodules)}) (C {(die)} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1636) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Failed to register submodule '") (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\$' span_id:1641) ) ("sm_path'") ) } ) ] ) ) ) } ) ] ) ] ) ) (command.ShFunction name: cmd_foreach body: (command.BraceGroup children: [ (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:1679) cond: [(C {(test)} {($ Id.VSub_Pound '$#')} {(-ne)} {(0)})] body: (command.DoGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(-q)} {(--quiet)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_QUIET) op: assign_op.Equal rhs: {(1)} spids: [1708] ) ] ) ] spids: [1702 1705 1712 -1] ) (case_arm pat_list: [{(--recursive)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:recursive) op: assign_op.Equal rhs: {(1)} spids: [1719] ) ] ) ] spids: [1715 1716 1723 -1] ) (case_arm pat_list: [{(-) (Id.Lit_Star '*')}] action: [(C {(usage)})] spids: [1726 1728 1734 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:1741) ) ] spids: [1737 1738 1744 -1] ) ] ) (C {(shift)}) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:toplevel) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1758) command_list: (command.CommandList children:[(C {(pwd)})]) ) } spids: [1757] ) ] ) (command.Simple words: [{(exec)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_LessAnd val:'3<&' span_id:1774) fd: 3 arg_word: {(0)} ) ] ) (command.Pipeline children: [ (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(git)} {(submodule--helper)} {(list)} {(--prefix)} {(DQ ($ Id.VSub_DollarName '$wt_prefix'))} ) (C {(echo)} {(DQ ('#unmatched'))} {($ Id.VSub_QMark '$?')}) ] ) ] ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:1811) cond: [(C {(read)} {(mode)} {(sha1)} {(stage)} {(sm_path)})] body: (command.DoGroup children: [ (C {(die_if_unmatched)} {(DQ ($ Id.VSub_DollarName '$mode'))} {(DQ ($ Id.VSub_DollarName '$sha1'))} ) (command.If arms: [ (if_arm cond: [ (C {(test)} {(-e)} {(DQ ($ Id.VSub_DollarName '$sm_path')) (/.git)}) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:displaypath) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 1854 ) command_list: (command.CommandList children: [ (C {(git)} {(submodule--helper)} {(relative-path)} { (DQ ($ Id.VSub_DollarName '$prefix') ($ Id.VSub_DollarName '$sm_path') ) } {(DQ ($ Id.VSub_DollarName '$wt_prefix'))} ) ] ) ) } spids: [1853] ) ] ) (C {(say)} { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 1875 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Entering '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 1880 ) ) ("displaypath'") ) } ) ] ) ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:name) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 1888 ) command_list: (command.CommandList children: [ (C {(git)} {(submodule--helper)} {(name)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} ) ] ) ) } spids: [1887] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Subshell command_list: (command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:prefix) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$prefix') ($ Id.VSub_DollarName '$sm_path') (/) ) } spids: [1904] ) ] ) (C {(sanitize_submodule_env)}) (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp] children: [ (C {(cd)} {(DQ ($ Id.VSub_DollarName '$sm_path'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sm_path) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 1925 ) command_list: (command.CommandList children: [ (C {(git)} {(submodule--helper)} {(relative-path)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} {(DQ ($ Id.VSub_DollarName '$wt_prefix'))} ) ] ) ) } spids: [1924] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:path) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$sm_path')} spids: [1948] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(test)} {($ Id.VSub_Pound '$#')} {(-eq)} {(1)} ) ] action: [ (C {(eval)} {(DQ ($ Id.VSub_Number '$1'))}) ] spids: [1954 1965] ) ] else_action: [(C {(DQ ($ Id.VSub_At '$@'))})] ) (command.If arms: [ (if_arm cond: [ (C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$recursive'))} ) ] action: [ (C {(cmd_foreach)} {(DQ (--recursive))} {(DQ ($ Id.VSub_At '$@'))} ) ] spids: [1988 1999] ) ] ) ] ) ] ) redirects: [ (redir.Redir op: (Token id:Id.Redir_LessAnd val:'<&' span_id:2018) fd: -1 arg_word: {(3)} ) (redir.Redir op: (Token id:Id.Redir_LessAnd val:'3<&' span_id:2021) fd: 3 arg_word: {(-)} ) ] ) (C {(die)} { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 2030 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Stopping at '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 2035 ) ) ("displaypath'; script returned non-zero status.") ) } ) ] ) ) ) } ) ] ) ] spids: [1838 1850] ) ] ) ] ) ) ] negated: F ) ] ) ) (command.ShFunction name: cmd_init body: (command.BraceGroup children: [ (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:2076) cond: [(C {(test)} {($ Id.VSub_Pound '$#')} {(-ne)} {(0)})] body: (command.DoGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(-q)} {(--quiet)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_QUIET) op: assign_op.Equal rhs: {(1)} spids: [2105] ) ] ) ] spids: [2099 2102 2109 -1] ) (case_arm pat_list: [{(--)}] action: [ (C {(shift)}) (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:2119) ) ] spids: [2112 2113 2122 -1] ) (case_arm pat_list: [{(-) (Id.Lit_Star '*')}] action: [(C {(usage)})] spids: [2125 2127 2133 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:2140) ) ] spids: [2136 2137 2143 -1] ) ] ) (C {(shift)}) ] ) ) (C {(git)} { (braced_var_sub token: (Token id:Id.VSub_Name val:wt_prefix span_id:2159) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {('-C ') (DQ ($ Id.VSub_DollarName '$wt_prefix'))} ) ) } {(submodule--helper)} {(init)} { (braced_var_sub token: (Token id:Id.VSub_Name val:GIT_QUIET span_id:2172) suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonPlus arg_word:{(--quiet)}) ) } { (braced_var_sub token: (Token id:Id.VSub_Name val:prefix span_id:2178) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {('--prefix ') (DQ ($ Id.VSub_DollarName '$prefix'))} ) ) } {(DQ ($ Id.VSub_At '$@'))} ) ] ) ) (command.ShFunction name: cmd_deinit body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:deinit_all) op: assign_op.Equal rhs: (word.Empty) spids: [2213] ) ] ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:2216) cond: [(C {(test)} {($ Id.VSub_Pound '$#')} {(-ne)} {(0)})] body: (command.DoGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(-f)} {(--force)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:force) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [2245] ) ] ) ] spids: [2239 2242 2249 -1] ) (case_arm pat_list: [{(-q)} {(--quiet)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_QUIET) op: assign_op.Equal rhs: {(1)} spids: [2258] ) ] ) ] spids: [2252 2255 2262 -1] ) (case_arm pat_list: [{(--all)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:deinit_all) op: assign_op.Equal rhs: {(t)} spids: [2269] ) ] ) ] spids: [2265 2266 2273 -1] ) (case_arm pat_list: [{(--)}] action: [ (C {(shift)}) (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:2283) ) ] spids: [2276 2277 2286 -1] ) (case_arm pat_list: [{(-) (Id.Lit_Star '*')}] action: [(C {(usage)})] spids: [2289 2291 2297 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:2304) ) ] spids: [2300 2301 2307 -1] ) ] ) (C {(shift)}) ] ) ) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$deinit_all'))}) (C {(test)} {(DQ ($ Id.VSub_Pound '$#'))} {(-ne)} {(0)}) ] ) ] action: [ (command.Simple words: [ {(echo)} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2352) command_list: (command.CommandList children: [ (C {(eval_gettext)} {(DQ ('pathspec and --all are incompatible'))}) ] ) ) ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:2348) fd: -1 arg_word: {(2)} ) ] ) (C {(usage)}) ] spids: [2320 2343] ) ] ) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {($ Id.VSub_Pound '$#')} {(Id.Lit_Equals '=')} {(0)}) (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$deinit_all'))}) ] ) ] action: [ (C {(die)} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2395) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ( "Use '--all' if you really want to deinitialize all submodules" ) ) } ) ] ) ) ) } ) ] spids: [2368 2389] ) ] ) (command.Pipeline children: [ (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(git)} {(submodule--helper)} {(list)} {(--prefix)} {(DQ ($ Id.VSub_DollarName '$wt_prefix'))} {(DQ ($ Id.VSub_At '$@'))} ) (C {(echo)} {(DQ ('#unmatched'))} {($ Id.VSub_QMark '$?')}) ] ) ] ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:2445) cond: [(C {(read)} {(mode)} {(sha1)} {(stage)} {(sm_path)})] body: (command.DoGroup children: [ (C {(die_if_unmatched)} {(DQ ($ Id.VSub_DollarName '$mode'))} {(DQ ($ Id.VSub_DollarName '$sha1'))} ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:name) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 2473 ) command_list: (command.CommandList children: [ (C {(git)} {(submodule--helper)} {(name)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} ) ] ) ) } spids: [2472] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:2487) ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:displaypath) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2492) command_list: (command.CommandList children: [ (C {(git)} {(submodule--helper)} {(relative-path)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} {(DQ ($ Id.VSub_DollarName '$wt_prefix'))} ) ] ) ) } spids: [2491] ) ] ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-d)} {(DQ ($ Id.VSub_DollarName '$sm_path'))})] action: [ (command.If arms: [ (if_arm cond: [ (C {(test)} {(-d)} {(DQ ($ Id.VSub_DollarName '$sm_path') (/.git))} ) ] action: [ (C {(die)} { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 2550 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Submodule work tree '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 2556 ) ) ("displaypath' contains a .git directory\n") ( "(use 'rm -rf' if you really want to remove it including all of its history)" ) ) } ) ] ) ) ) } ) ] spids: [2532 2544] ) ] ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$force'))})] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(git)} {(rm)} {(-qn)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} ) (C {(die)} { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 2598 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Submodule work tree '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 2603 ) ) ("displaypath' contains local modifications; use '-f' to discard them") ) } ) ] ) ) ) } ) ] ) ] spids: [2568 2579] ) ] ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DPipe] children: [ (C {(rm)} {(-rf)} {(DQ ($ Id.VSub_DollarName '$sm_path'))}) (C {(say)} { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 2627 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Cleared directory '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 2632 ) ) ("displaypath'") ) } ) ] ) ) ) } ) (C {(say)} { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 2644 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Could not remove submodule work tree '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 2649 ) ) ("displaypath'") ) } ) ] ) ) ) } ) ] ) ] spids: [2514 2525] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(mkdir)} {(DQ ($ Id.VSub_DollarName '$sm_path'))}) (C {(say)} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2671) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Could not create empty submodule directory '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 2676 ) ) ("displaypath'") ) } ) ] ) ) ) } ) ] ) (command.If arms: [ (if_arm cond: [ (C {(test)} {(-n)} { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 2695 ) command_list: (command.CommandList children: [ (C {(git)} {(config)} {(--get-regexp)} {(submodule.) (DQ ($ Id.VSub_DollarName '$name') (Id.Lit_Other '\\') (.) ) } ) ] ) ) ) } ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:url) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 2724 ) command_list: (command.CommandList children: [ (C {(git)} {(config)} {(submodule.) (DQ ($ Id.VSub_DollarName '$name')) (.url) } ) ] ) ) } spids: [2723] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [ {(git)} {(config)} {(--remove-section)} {(submodule.) (DQ ($ Id.VSub_DollarName '$name'))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:2748) fd: 2 arg_word: {(/dev/null)} ) ] ) (C {(say)} { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 2757 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Submodule '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 2762 ) ) ("name' (") (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:2764)) ("url) unregistered for path '") (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:2766)) ("displaypath'") ) } ) ] ) ) ) } ) ] ) ] spids: [2688 2712] ) ] ) ] ) ) ] negated: F ) ] ) ) (command.ShFunction name: is_tip_reachable body: (command.Subshell command_list: (command.CommandList children: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp] children: [ (C {(sanitize_submodule_env)}) (C {(cd)} {(DQ ($ Id.VSub_Number '$1'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:rev) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2804) command_list: (command.CommandList children: [ (command.Simple words: [ {(git)} {(rev-list)} {(-n)} {(1)} {(DQ ($ Id.VSub_Number '$2'))} {(--not)} {(--all)} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:2821) fd: 2 arg_word: {(/dev/null)} ) ] ) ] ) ) } spids: [2803] ) ] ) (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$rev'))}) ] ) ] ) ) ) (command.ShFunction name: fetch_in_submodule body: (command.Subshell command_list: (command.CommandList children: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (C {(sanitize_submodule_env)}) (C {(cd)} {(DQ ($ Id.VSub_Number '$1'))}) (command.Case to_match: {(DQ ($ Id.VSub_Number '$2'))} arms: [ (case_arm pat_list: [{(SQ )}] action: [(C {(git)} {(fetch)})] spids: [2870 2872 2879 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (C {(shift)}) (C {(git)} {(fetch)} { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:2893) command_list: (command.CommandList children: [(C {(get_default_remote)})] ) ) } {(DQ ($ Id.VSub_At '$@'))} ) ] spids: [2882 2883 2901 -1] ) ] ) ] ) ] ) ) ) (command.ShFunction name: cmd_update body: (command.BraceGroup children: [ (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:2935) cond: [(C {(test)} {($ Id.VSub_Pound '$#')} {(-ne)} {(0)})] body: (command.DoGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(-q)} {(--quiet)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_QUIET) op: assign_op.Equal rhs: {(1)} spids: [2964] ) ] ) ] spids: [2958 2961 2968 -1] ) (case_arm pat_list: [{(--progress)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:progress) op: assign_op.Equal rhs: {(DQ (--progress))} spids: [2975] ) ] ) ] spids: [2971 2972 2981 -1] ) (case_arm pat_list: [{(-i)} {(--init)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:init) op: assign_op.Equal rhs: {(1)} spids: [2990] ) ] ) ] spids: [2984 2987 2994 -1] ) (case_arm pat_list: [{(--remote)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:remote) op: assign_op.Equal rhs: {(1)} spids: [3001] ) ] ) ] spids: [2997 2998 3005 -1] ) (case_arm pat_list: [{(-N)} {(--no-fetch)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:nofetch) op: assign_op.Equal rhs: {(1)} spids: [3014] ) ] ) ] spids: [3008 3011 3018 -1] ) (case_arm pat_list: [{(-f)} {(--force)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:force) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [3027] ) ] ) ] spids: [3021 3024 3031 -1] ) (case_arm pat_list: [{(-r)} {(--rebase)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:update) op: assign_op.Equal rhs: {(DQ (rebase))} spids: [3040] ) ] ) ] spids: [3034 3037 3046 -1] ) (case_arm pat_list: [{(--reference)}] action: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$2'))} arms: [ (case_arm pat_list: [{(SQ )}] action: [(C {(usage)})] spids: [3061 3063 3067 -1] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:reference) op: assign_op.Equal rhs: {(DQ ('--reference=') ($ Id.VSub_Number '$2'))} spids: [3072] ) ] ) (C {(shift)}) ] spids: [3049 3050 3082 -1] ) (case_arm pat_list: [{(--reference) (Id.Lit_Equals '=') (Id.Lit_Star '*')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:reference) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [3091] ) ] ) ] spids: [3085 3088 3097 -1] ) (case_arm pat_list: [{(-m)} {(--merge)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:update) op: assign_op.Equal rhs: {(DQ (merge))} spids: [3106] ) ] ) ] spids: [3100 3103 3112 -1] ) (case_arm pat_list: [{(--recursive)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:recursive) op: assign_op.Equal rhs: {(1)} spids: [3119] ) ] ) ] spids: [3115 3116 3123 -1] ) (case_arm pat_list: [{(--checkout)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:update) op: assign_op.Equal rhs: {(DQ (checkout))} spids: [3130] ) ] ) ] spids: [3126 3127 3136 -1] ) (case_arm pat_list: [{(--recommend-shallow)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:recommend_shallow) op: assign_op.Equal rhs: {(DQ (--recommend-shallow))} spids: [3143] ) ] ) ] spids: [3139 3140 3149 -1] ) (case_arm pat_list: [{(--no-recommend-shallow)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:recommend_shallow) op: assign_op.Equal rhs: {(DQ (--no-recommend-shallow))} spids: [3156] ) ] ) ] spids: [3152 3153 3162 -1] ) (case_arm pat_list: [{(--depth)}] action: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$2'))} arms: [ (case_arm pat_list: [{(SQ )}] action: [(C {(usage)})] spids: [3177 3179 3183 -1] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:depth) op: assign_op.Equal rhs: {(DQ ('--depth=') ($ Id.VSub_Number '$2'))} spids: [3188] ) ] ) (C {(shift)}) ] spids: [3165 3166 3198 -1] ) (case_arm pat_list: [{(--depth) (Id.Lit_Equals '=') (Id.Lit_Star '*')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:depth) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [3207] ) ] ) ] spids: [3201 3204 3211 -1] ) (case_arm pat_list: [{(-j)} {(--jobs)}] action: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$2'))} arms: [ (case_arm pat_list: [{(SQ )}] action: [(C {(usage)})] spids: [3228 3230 3234 -1] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:jobs) op: assign_op.Equal rhs: {(DQ ('--jobs=') ($ Id.VSub_Number '$2'))} spids: [3239] ) ] ) (C {(shift)}) ] spids: [3214 3217 3249 -1] ) (case_arm pat_list: [{(--jobs) (Id.Lit_Equals '=') (Id.Lit_Star '*')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:jobs) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [3258] ) ] ) ] spids: [3252 3255 3262 -1] ) (case_arm pat_list: [{(--)}] action: [ (C {(shift)}) (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:3272) ) ] spids: [3265 3266 3275 -1] ) (case_arm pat_list: [{(-) (Id.Lit_Star '*')}] action: [(C {(usage)})] spids: [3278 3280 3286 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:3293) ) ] spids: [3289 3290 3296 -1] ) ] ) (C {(shift)}) ] ) ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$init'))})] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(cmd_init)} {(DQ (--))} {(DQ ($ Id.VSub_At '$@'))}) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:3335) ) ] ) ] spids: [3309 3320] ) ] ) (command.Pipeline children: [ (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(git)} {(submodule--helper)} {(update-clone)} { (braced_var_sub token: (Token id:Id.VSub_Name val:GIT_QUIET span_id:3352) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {(--quiet)} ) ) } { (braced_var_sub token: (Token id:Id.VSub_Name val:progress span_id:3360) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {(DQ ($ Id.VSub_DollarName '$progress'))} ) ) } { (braced_var_sub token: (Token id:Id.VSub_Name val:wt_prefix span_id:3370) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {('--prefix ') (DQ ($ Id.VSub_DollarName '$wt_prefix'))} ) ) } { (braced_var_sub token: (Token id:Id.VSub_Name val:prefix span_id:3381) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {('--recursive-prefix ') (DQ ($ Id.VSub_DollarName '$prefix'))} ) ) } { (braced_var_sub token: (Token id:Id.VSub_Name val:update span_id:3392) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {('--update ') (DQ ($ Id.VSub_DollarName '$update'))} ) ) } { (braced_var_sub token: (Token id:Id.VSub_Name val:reference span_id:3403) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {(DQ ($ Id.VSub_DollarName '$reference'))} ) ) } { (braced_var_sub token: (Token id:Id.VSub_Name val:depth span_id:3413) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {('--depth ') (DQ ($ Id.VSub_DollarName '$depth'))} ) ) } { (braced_var_sub token: (Token id:Id.VSub_Name val:recommend_shallow span_id:3424) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {(DQ ($ Id.VSub_DollarName '$recommend_shallow'))} ) ) } { (braced_var_sub token: (Token id:Id.VSub_Name val:jobs span_id:3434) suffix_op: (suffix_op.Unary op_id: Id.VTest_ColonPlus arg_word: {($ Id.VSub_DollarName '$jobs')} ) ) } {(DQ ($ Id.VSub_At '$@'))} ) (C {(echo)} {(DQ ('#unmatched'))} {($ Id.VSub_QMark '$?')}) ] ) ] ) (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:err) op: assign_op.Equal rhs: (word.Empty) spids: [3463] ) ] ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:3466) cond: [(C {(read)} {(mode)} {(sha1)} {(stage)} {(just_cloned)} {(sm_path)})] body: (command.DoGroup children: [ (C {(die_if_unmatched)} {(DQ ($ Id.VSub_DollarName '$mode'))} {(DQ ($ Id.VSub_DollarName '$sha1'))} ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:name) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 3497 ) command_list: (command.CommandList children: [ (C {(git)} {(submodule--helper)} {(name)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} ) ] ) ) } spids: [3496] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:3511) ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:url) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 3515 ) command_list: (command.CommandList children: [ (C {(git)} {(config)} {(submodule.) (DQ ($ Id.VSub_DollarName '$name')) (.url) } ) ] ) ) } spids: [3514] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Pipeline children: [ (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$update'))}) ] negated: T ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:update_module) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$update')} spids: [3544] ) ] ) ] spids: [3528 3541] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:update_module) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 3552 ) command_list: (command.CommandList children: [ (C {(git)} {(config)} {(submodule.) (DQ ($ Id.VSub_DollarName '$name')) (.update) } ) ] ) ) } spids: [3551] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$update_module'))}) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:update_module) op: assign_op.Equal rhs: {(DQ (checkout))} spids: [3579] ) ] ) ] spids: [3565 3576] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:displaypath) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 3593 ) command_list: (command.CommandList children: [ (C {(git)} {(submodule--helper)} {(relative-path)} { (DQ ($ Id.VSub_DollarName '$prefix') ($ Id.VSub_DollarName '$sm_path') ) } {(DQ ($ Id.VSub_DollarName '$wt_prefix'))} ) ] ) ) } spids: [3592] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(test)} {($ Id.VSub_DollarName '$just_cloned')} {(-eq)} {(1)}) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:subsha1) op: assign_op.Equal rhs: (word.Empty) spids: [3626] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:update_module) op: assign_op.Equal rhs: {(checkout)} spids: [3629] ) ] ) ] spids: [3612 3623] ) ] else_action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:subsha1) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 3637 ) command_list: (command.CommandList children: [ (command.Sentence child: (C {(sanitize_submodule_env)}) terminator: (Token id: Id.Op_Semi val: ';' span_id: 3639 ) ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(cd)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} ) (C {(git)} {(rev-parse)} {(--verify)} {(HEAD)}) ] ) ] ) ) } spids: [3636] ) ] ) (C {(die)} { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 3665 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ( "Unable to find current revision in submodule path '" ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:3670)) ("displaypath'") ) } ) ] ) ) ) } ) ] ) ] ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$remote'))})] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:branch) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 3696 ) command_list: (command.CommandList children: [ (C {(git)} {(submodule--helper)} {(remote-branch)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} ) ] ) ) } spids: [3695] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$nofetch'))}) ] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(fetch_in_submodule)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} {($ Id.VSub_DollarName '$depth')} ) (C {(die)} { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 3741 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ( "Unable to fetch in submodule path '" ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:3746)) ("sm_path'") ) } ) ] ) ) ) } ) ] ) ] spids: [3709 3720] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:remote_name) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 3757 ) command_list: (command.CommandList children: [ (command.Sentence child: (C {(sanitize_submodule_env)}) terminator: (Token id: Id.Op_Semi val: ';' span_id: 3759 ) ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(cd)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} ) (C {(get_default_remote)}) ] ) ] ) ) } spids: [3756] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sha1) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 3774 ) command_list: (command.CommandList children: [ (command.Sentence child: (C {(sanitize_submodule_env)}) terminator: (Token id: Id.Op_Semi val: ';' span_id: 3776 ) ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(cd)} { (DQ ($ Id.VSub_DollarName '$sm_path') ) } ) (C {(git)} {(rev-parse)} {(--verify)} { (DQ (${ Id.VSub_Name remote_name) (/) (${ Id.VSub_Name branch) ) } ) ] ) ] ) ) } spids: [3773] ) ] ) (C {(die)} { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 3810 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ('Unable to find current ') (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 3815 ) ) ('{remote_name}/') (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 3817 ) ) ("{branch} revision in submodule path '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 3819 ) ) ("sm_path'") ) } ) ] ) ) ) } ) ] ) ] spids: [3681 3692] ) ] ) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(test)} {(DQ ($ Id.VSub_DollarName '$subsha1'))} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(DQ ($ Id.VSub_DollarName '$sha1'))} ) (C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$force'))}) ] ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:subforce) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$force')} spids: [3859] ) ] ) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$subsha1'))} ) (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$force'))}) ] ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:subforce) op: assign_op.Equal rhs: {(DQ (-f))} spids: [3891] ) ] ) ] spids: [3867 3888] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$nofetch'))}) ] action: [ (command.AndOr ops: [Id.Op_DPipe Id.Op_DPipe] children: [ (C {(is_tip_reachable)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} {(DQ ($ Id.VSub_DollarName '$sha1'))} ) (C {(fetch_in_submodule)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} {($ Id.VSub_DollarName '$depth')} ) (C {(die)} { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 3950 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ( "Unable to fetch in submodule path '" ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:3955)) ("displaypath'") ) } ) ] ) ) ) } ) ] ) (command.AndOr ops: [Id.Op_DPipe Id.Op_DPipe] children: [ (C {(is_tip_reachable)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} {(DQ ($ Id.VSub_DollarName '$sha1'))} ) (C {(fetch_in_submodule)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} {($ Id.VSub_DollarName '$depth')} {(DQ ($ Id.VSub_DollarName '$sha1'))} ) (C {(die)} { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 4002 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Fetched in submodule path '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 4007 ) ) ("displaypath', but it did not contain ") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 4009 ) ) ('sha1. Direct fetching of that commit failed.') ) } ) ] ) ) ) } ) ] ) ] spids: [3901 3912] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:must_die_on_failure) op: assign_op.Equal rhs: (word.Empty) spids: [4020] ) ] ) (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$update_module'))} arms: [ (case_arm pat_list: [{(checkout)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:command) op: assign_op.Equal rhs: { (DQ ('git checkout ') ($ Id.VSub_DollarName '$subforce') (' -q') ) } spids: [4036] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:die_msg) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 4046 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Unable to checkout '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 4051 ) ) ("sha1' in submodule path '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 4053 ) ) ("displaypath'") ) } ) ] ) ) ) } spids: [4044] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:say_msg) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 4062 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Submodule path '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 4067 ) ) ("displaypath': checked out '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 4069 ) ) ("sha1'") ) } ) ] ) ) ) } spids: [4060] ) ] ) ] spids: [4032 4033 4076 -1] ) (case_arm pat_list: [{(rebase)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:command) op: assign_op.Equal rhs: {(DQ ('git rebase'))} spids: [4083] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:die_msg) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 4091 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Unable to rebase '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 4096 ) ) ("sha1' in submodule path '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 4098 ) ) ("displaypath'") ) } ) ] ) ) ) } spids: [4089] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:say_msg) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 4107 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Submodule path '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 4112 ) ) ("displaypath': rebased into '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 4114 ) ) ("sha1'") ) } ) ] ) ) ) } spids: [4105] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:must_die_on_failure) op: assign_op.Equal rhs: {(yes)} spids: [4121] ) ] ) ] spids: [4079 4080 4125 -1] ) (case_arm pat_list: [{(merge)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:command) op: assign_op.Equal rhs: {(DQ ('git merge'))} spids: [4132] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:die_msg) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 4140 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Unable to merge '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 4145 ) ) ("sha1' in submodule path '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 4147 ) ) ("displaypath'") ) } ) ] ) ) ) } spids: [4138] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:say_msg) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 4156 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Submodule path '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 4161 ) ) ("displaypath': merged in '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 4163 ) ) ("sha1'") ) } ) ] ) ) ) } spids: [4154] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:must_die_on_failure) op: assign_op.Equal rhs: {(yes)} spids: [4170] ) ] ) ] spids: [4128 4129 4174 -1] ) (case_arm pat_list: [{(Id.KW_Bang '!') (Id.Lit_Star '*')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:command) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: (Token id: Id.VSub_Name val: update_module span_id: 4185 ) suffix_op: (suffix_op.Unary op_id: Id.VOp1_Pound arg_word: {('!')} ) ) ) } spids: [4182] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:die_msg) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 4194 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Execution of '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 4199 ) ) ('command ') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:4201)) ( "sha1' failed in submodule path '" ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:4203)) ("displaypath'") ) } ) ] ) ) ) } spids: [4192] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:say_msg) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 4212 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Submodule path '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 4217 ) ) ("displaypath': '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 4219 ) ) ('command ') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:4221)) ("sha1'") ) } ) ] ) ) ) } spids: [4210] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:must_die_on_failure) op: assign_op.Equal rhs: {(yes)} spids: [4228] ) ] ) ] spids: [4177 4179 4232 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (C {(die)} { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 4242 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Invalid update mode '") ($ Id.VSub_DollarName '$update_module' ) ("' for submodule '") ($ Id.VSub_DollarName '$name') ("'") ) } ) ] ) ) ) } ) ] spids: [4235 4236 -1 4256] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Subshell command_list: (command.CommandList children: [ (command.Sentence child: (C {(sanitize_submodule_env)}) terminator: (Token id: Id.Op_Semi val: ';' span_id: 4264 ) ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(cd)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} ) (C {($ Id.VSub_DollarName '$command')} {(DQ ($ Id.VSub_DollarName '$sha1'))} ) ] ) ] ) ) ] action: [(C {(say)} {(DQ ($ Id.VSub_DollarName '$say_msg'))})] spids: [4260 4282] ) (if_arm cond: [ (C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$must_die_on_failure'))} ) ] action: [ (C {(die_with_status)} {(2)} {(DQ ($ Id.VSub_DollarName '$die_msg'))} ) ] spids: [4292 4303] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:err) op: assign_op.Equal rhs: { (DQ (${ Id.VSub_Name err) (';') ($ Id.VSub_DollarName '$die_msg') ) } spids: [4318] ) ] ) (command.ControlFlow token: (Token id: Id.ControlFlow_Continue val: continue span_id: 4328 ) ) ] ) ] spids: [3830 3856] ) ] ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$recursive'))})] action: [ (command.Subshell command_list: (command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:prefix) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 4356 ) command_list: (command.CommandList children: [ (C {(git)} {(submodule--helper)} {(relative-path)} {(DQ ($ Id.VSub_DollarName '$prefix') ($ Id.VSub_DollarName '$sm_path') (/))} { (DQ ($ Id.VSub_DollarName '$wt_prefix' ) ) } ) ] ) ) } spids: [4355] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:wt_prefix) op: assign_op.Equal rhs: (word.Empty) spids: [4375] ) ] ) (C {(sanitize_submodule_env)}) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(cd)} {(DQ ($ Id.VSub_DollarName '$sm_path'))}) (C {(eval)} {(cmd_update)}) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:res) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [4398] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(test)} {($ Id.VSub_DollarName '$res')} {(-gt)} {(0)}) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:die_msg) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 4418 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ( "Failed to recurse into submodule path '" ) (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:4423)) ("displaypath'") ) } ) ] ) ) ) } spids: [4416] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(test)} {($ Id.VSub_DollarName '$res')} {(-ne)} {(2)} ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:err) op: assign_op.Equal rhs: { (DQ (${ Id.VSub_Name err) (';') ($ Id.VSub_DollarName '$die_msg') ) } spids: [4444] ) ] ) (command.ControlFlow token: (Token id: Id.ControlFlow_Continue val: continue span_id: 4454 ) ) ] spids: [4430 4441] ) ] else_action: [ (C {(die_with_status)} {($ Id.VSub_DollarName '$res')} {(DQ ($ Id.VSub_DollarName '$die_msg'))} ) ] ) ] spids: [4402 4413] ) ] ) ] spids: [4338 4349] ) ] ) ] ) ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$err'))})] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OIFS) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$IFS')} spids: [4496] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:IFS) op: assign_op.Equal rhs: {(SQ (Token id:Id.Lit_Chars val:';' span_id:4502))} spids: [4500] ) ] ) (command.ForEach iter_name: e iter_words: [{($ Id.VSub_DollarName '$err')}] do_arg_iter: F body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [(C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$e'))})] action: [ (command.Simple words: [{(echo)} {(DQ ($ Id.VSub_DollarName '$e'))}] redirects: [ (redir.Redir op: (Token id: Id.Redir_GreatAnd val: '>&' span_id: 4534 ) fd: -1 arg_word: {(2)} ) ] ) ] spids: [4518 4529] ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:IFS) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$OIFS')} spids: [4548] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:4552) arg_word: {(1)} ) ] spids: [4482 4493] ) ] ) ] ) ] negated: F ) ] ) ) (command.ShFunction name: set_name_rev body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:revname) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:4574) command_list: (command.CommandList children: [ (command.Subshell command_list: (command.CommandList children: [ (C {(sanitize_submodule_env)}) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(cd)} {(DQ ($ Id.VSub_Number '$1'))}) (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe Id.Op_DPipe Id.Op_DPipe] children: [ (command.Simple words: [ {(git)} {(describe)} {(DQ ($ Id.VSub_Number '$2'))} ] redirects: [ (redir.Redir op: (Token id: Id.Redir_Great val: '2>' span_id: 4601 ) fd: 2 arg_word: {(/dev/null)} ) ] ) (command.Simple words: [ {(git)} {(describe)} {(--tags)} {(DQ ($ Id.VSub_Number '$2'))} ] redirects: [ (redir.Redir op: (Token id: Id.Redir_Great val: '2>' span_id: 4617 ) fd: 2 arg_word: {(/dev/null)} ) ] ) (command.Simple words: [ {(git)} {(describe)} {(--contains)} {(DQ ($ Id.VSub_Number '$2'))} ] redirects: [ (redir.Redir op: (Token id: Id.Redir_Great val: '2>' span_id: 4633 ) fd: 2 arg_word: {(/dev/null)} ) ] ) (C {(git)} {(describe)} {(--all)} {(--always)} {(DQ ($ Id.VSub_Number '$2'))} ) ] ) ] ) ] ) ] ) ) ] ) ) } spids: [4573] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$revname'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:revname) op: assign_op.Equal rhs: {(DQ (' (') ($ Id.VSub_DollarName '$revname') (')'))} spids: [4670] ) ] ) ] ) ] ) ) (command.ShFunction name: cmd_summary body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:summary_limit) op: assign_op.Equal rhs: {(-1)} spids: [4710] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:for_status) op: assign_op.Equal rhs: (word.Empty) spids: [4714] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:diff_cmd) op: assign_op.Equal rhs: {(diff-index)} spids: [4717] ) ] ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:4726) cond: [(C {(test)} {($ Id.VSub_Pound '$#')} {(-ne)} {(0)})] body: (command.DoGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(--cached)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cached) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [4753] ) ] ) ] spids: [4749 4750 4759 -1] ) (case_arm pat_list: [{(--files)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:files) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [4766] ) ] ) ] spids: [4762 4763 4772 -1] ) (case_arm pat_list: [{(--for-status)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:for_status) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [4779] ) ] ) ] spids: [4775 4776 4785 -1] ) (case_arm pat_list: [{(-n)} {(--summary-limit)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:summary_limit) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$2'))} spids: [4794] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(isnumber)} {(DQ ($ Id.VSub_DollarName '$summary_limit'))}) (C {(usage)}) ] ) (C {(shift)}) ] spids: [4788 4791 4814 -1] ) (case_arm pat_list: [{(--summary-limit) (Id.Lit_Equals '=') (Id.Lit_Star '*')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:summary_limit) op: assign_op.Equal rhs: { (DQ (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:4826) suffix_op: (suffix_op.Unary op_id: Id.VOp1_Pound arg_word: {('--summary-limit=')} ) ) ) } spids: [4823] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(isnumber)} {(DQ ($ Id.VSub_DollarName '$summary_limit'))}) (C {(usage)}) ] ) ] spids: [4817 4820 4844 -1] ) (case_arm pat_list: [{(--)}] action: [ (C {(shift)}) (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:4854) ) ] spids: [4847 4848 4857 -1] ) (case_arm pat_list: [{(-) (Id.Lit_Star '*')}] action: [(C {(usage)})] spids: [4860 4862 4868 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:4875) ) ] spids: [4871 4872 4878 -1] ) ] ) (C {(shift)}) ] ) ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {($ Id.VSub_DollarName '$summary_limit')} {(Id.Lit_Equals '=')} {(0)}) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:4901) ) ] ) (command.If arms: [ (if_arm cond: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:rev) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:4908) command_list: (command.CommandList children: [ (C {(git)} {(rev-parse)} {(-q)} {(--verify)} {(--default)} {(HEAD)} { (braced_var_sub token: (Token id:Id.VSub_Number val:1 span_id:4922) suffix_op: (suffix_op.Unary op_id: Id.VTest_Plus arg_word: {(DQ ($ Id.VSub_Number '$1'))} ) ) } ) ] ) ) } spids: [4907] ) ] ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:head) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$rev')} spids: [4934] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(test)} {($ Id.VSub_Pound '$#')} {(Id.Lit_Equals '=')} {(0)}) (C {(shift)}) ] ) ] spids: [4905 4931] ) (if_arm cond: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(test)} {(-z)} {(DQ ($ Id.VSub_Number '$1'))}) (C {(test)} {(DQ ($ Id.VSub_Number '$1'))} {(Id.Lit_Equals '=')} {(DQ (HEAD))}) ] ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:head) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:4984) command_list: (command.CommandList children: [ (command.Simple words: [{(git)} {(hash-object)} {(-w)} {(-t)} {(tree)} {(--stdin)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Less val:'<' span_id:4997) fd: -1 arg_word: {(/dev/null)} ) ] ) ] ) ) } spids: [4983] ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [(C {(test)} {(-z)} {(DQ ($ Id.VSub_Number '$1'))}) (C {(shift)})] ) ] spids: [4951 4976] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:head) op: assign_op.Equal rhs: {(DQ (HEAD))} spids: [5018] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(Id.Lit_LBracket '[')} {(-n)} {(DQ ($ Id.VSub_DollarName '$files'))} {(Id.Lit_RBracket ']')} ) ] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$cached'))}) (C {(die)} { (DQ (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:5058) command_list: (command.CommandList children: [ (C {(gettext)} { (DQ ( 'The --cached option cannot be used with the --files option' ) ) } ) ] ) ) ) } ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:diff_cmd) op: assign_op.Equal rhs: {(diff-files)} spids: [5068] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:head) op: assign_op.Equal rhs: (word.Empty) spids: [5072] ) ] ) ] spids: [5028 5041] ) ] ) (C {(cd_to_toplevel)}) (C {(eval)} { (DQ ('set ') (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:5086) command_list: (command.CommandList children: [ (C {(git)} {(rev-parse)} {(--sq)} {(--prefix)} {(DQ ($ Id.VSub_DollarName '$wt_prefix'))} {(--)} {(DQ ($ Id.VSub_At '$@'))} ) ] ) ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:modules) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:5113) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(git)} {($ Id.VSub_DollarName '$diff_cmd')} {($ Id.VSub_DollarName '$cached')} {(--ignore-submodules) (Id.Lit_Equals '=') (dirty)} {(--raw)} {($ Id.VSub_DollarName '$head')} {(--)} {(DQ ($ Id.VSub_At '$@'))} ) (C {(sane_egrep)} { (SQ (Token id: Id.Lit_Chars val: '^:([0-7]* )?160000' span_id: 5140 ) ) } ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:5146) cond: [ (C {(read)} {(mod_src)} {(mod_dst)} {(sha1_src)} {(sha1_dst)} {(status)} {(sm_path)} ) ] body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(test)} {(DQ ($ Id.VSub_DollarName '$status'))} {(Id.Lit_Equals '=')} {(D)} ) (C {(test)} {(DQ ($ Id.VSub_DollarName '$status'))} {(Id.Lit_Equals '=')} {(T)} ) ] ) ] action: [ (C {(printf)} { (SQ (Token id: Id.Lit_Chars val: '%s\\n' span_id: 5201 ) ) } {(DQ ($ Id.VSub_DollarName '$sm_path'))} ) (command.ControlFlow token: (Token id: Id.ControlFlow_Continue val: continue span_id: 5209 ) ) ] spids: [5170 5195] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$for_status'))} ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:name) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 5234 ) command_list: (command.CommandList children: [ (C {(git)} {(submodule--helper)} {(name)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} ) ] ) ) } spids: [5233] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ignore_config) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 5248 ) command_list: (command.CommandList children: [ (C {(get_submodule_config)} { (DQ ($ Id.VSub_DollarName '$name' ) ) } {(ignore)} {(none)} ) ] ) ) } spids: [5247] ) ] ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (C {(test)} {($ Id.VSub_DollarName '$status')} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(A)} ) (C {(test)} {($ Id.VSub_DollarName '$ignore_config')} {(Id.Lit_Equals '=')} {(all)} ) (command.ControlFlow token: (Token id: Id.ControlFlow_Continue val: continue span_id: 5282 ) ) ] ) ] spids: [5219 5230] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{(git-rev-parse)} {(--git-dir)}] redirects: [ (redir.Redir op: (Token id: Id.Redir_Great val: '>' span_id: 5302 ) fd: -1 arg_word: {(/dev/null)} ) (redir.Redir op: (Token id: Id.Redir_GreatAnd val: '2>&' span_id: 5305 ) fd: 2 arg_word: {(1)} ) ] more_env: [ (env_pair name: GIT_DIR val: {(DQ ($ Id.VSub_DollarName '$sm_path') (/.git))} spids: [5292] ) ] ) (C {(printf)} { (SQ (Token id: Id.Lit_Chars val: '%s\\n' span_id: 5314 ) ) } {(DQ ($ Id.VSub_DollarName '$sm_path'))} ) ] ) ] ) ) ] negated: F ) ] ) ) } spids: [5112] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$modules'))}) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:5339) ) ] ) (command.Pipeline children: [ (C {(git)} {($ Id.VSub_DollarName '$diff_cmd')} {($ Id.VSub_DollarName '$cached')} {(--ignore-submodules) (Id.Lit_Equals '=') (dirty)} {(--raw)} {($ Id.VSub_DollarName '$head')} {(--)} {($ Id.VSub_DollarName '$modules')} ) (C {(sane_egrep)} {(SQ (Token id:Id.Lit_Chars val:'^:([0-7]* )?160000' span_id:5367))}) (C {(cut)} {(-c2-)}) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:5380) cond: [ (C {(read)} {(mod_src)} {(mod_dst)} {(sha1_src)} {(sha1_dst)} {(status)} {(name)}) ] body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$cached'))}) (C {(test)} {($ Id.VSub_DollarName '$sha1_dst')} {(Id.Lit_Equals '=')} {(0000000000000000000000000000000000000000)} ) ] ) ] action: [ (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$mod_dst'))} arms: [ (case_arm pat_list: [{(160000)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sha1_dst) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 5439 ) command_list: (command.CommandList children: [ (command.Simple words: [{(git)} {(rev-parse)} {(HEAD)}] more_env: [ (env_pair name: GIT_DIR val: { (DQ ($ Id.VSub_DollarName '$name') (/.git) ) } spids: [5440] ) ] ) ] ) ) } spids: [5438] ) ] ) ] spids: [5434 5435 5454 -1] ) (case_arm pat_list: [{(100644)} {(100755)} {(120000)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sha1_dst) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 5470 ) command_list: (command.CommandList children: [ (C {(git)} {(hash-object)} {($ Id.VSub_DollarName '$name')} ) ] ) ) } spids: [5469] ) ] ) ] spids: [5457 5466 5479 -1] ) (case_arm pat_list: [{(000000)}] spids: [5482 5483 5486 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.Simple words: [ {(eval_gettextln)} { (DQ ('unexpected mode ') (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 5504 ) ) (mod_dst) ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:5508) fd: -1 arg_word: {(2)} ) ] ) (command.ControlFlow token: (Token id: Id.ControlFlow_Continue val: continue span_id: 5512 ) ) ] spids: [5492 5493 5514 -1] ) ] ) ] spids: [5400 5422] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:missing_src) op: assign_op.Equal rhs: (word.Empty) spids: [5523] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:missing_dst) op: assign_op.Equal rhs: (word.Empty) spids: [5526] ) ] ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (C {(test)} {($ Id.VSub_DollarName '$mod_src')} {(Id.Lit_Equals '=')} {(160000)} ) (command.Pipeline children: [ (command.Simple words: [ {(git-rev-parse)} {(-q)} {(--verify)} {($ Id.VSub_DollarName '$sha1_src') (Id.Lit_Other '^') (0)} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:5559) fd: -1 arg_word: {(/dev/null)} ) ] more_env: [ (env_pair name: GIT_DIR val: {(DQ ($ Id.VSub_DollarName '$name') (/.git))} spids: [5543] ) ] ) ] negated: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:missing_src) op: assign_op.Equal rhs: {(t)} spids: [5565] ) ] ) ] ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (C {(test)} {($ Id.VSub_DollarName '$mod_dst')} {(Id.Lit_Equals '=')} {(160000)} ) (command.Pipeline children: [ (command.Simple words: [ {(git-rev-parse)} {(-q)} {(--verify)} {($ Id.VSub_DollarName '$sha1_dst') (Id.Lit_Other '^') (0)} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:5599) fd: -1 arg_word: {(/dev/null)} ) ] more_env: [ (env_pair name: GIT_DIR val: {(DQ ($ Id.VSub_DollarName '$name') (/.git))} spids: [5583] ) ] ) ] negated: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:missing_dst) op: assign_op.Equal rhs: {(t)} spids: [5605] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:display_name) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:5611) command_list: (command.CommandList children: [ (C {(git)} {(submodule--helper)} {(relative-path)} {(DQ ($ Id.VSub_DollarName '$name'))} {(DQ ($ Id.VSub_DollarName '$wt_prefix'))} ) ] ) ) } spids: [5610] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:total_commits) op: assign_op.Equal rhs: (word.Empty) spids: [5629] ) ] ) (command.Case to_match: { (DQ ($ Id.VSub_DollarName '$missing_src') (',') ($ Id.VSub_DollarName '$missing_dst') ) } arms: [ (case_arm pat_list: [{(t) (Id.Lit_Comma ',')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:errmsg) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 5650 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ (' Warn: ') (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 5655 ) ) ("display_name doesn't contain commit ") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 5657 ) ) (sha1_src) ) } ) ] ) ) ) } spids: [5648] ) ] ) ] spids: [5643 5645 5664 -1] ) (case_arm pat_list: [{(Id.Lit_Comma ',') (t)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:errmsg) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 5674 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ (' Warn: ') (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 5679 ) ) ("display_name doesn't contain commit ") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 5681 ) ) (sha1_dst) ) } ) ] ) ) ) } spids: [5672] ) ] ) ] spids: [5667 5669 5688 -1] ) (case_arm pat_list: [{(t) (Id.Lit_Comma ',') (t)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:errmsg) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 5699 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ (' Warn: ') (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 5704 ) ) ("display_name doesn't contain commits ") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 5706 ) ) ('sha1_src and ') (word_part.EscapedLiteral token:(Token id:Id.Lit_EscapedChar val:'\\$' span_id:5708)) (sha1_dst) ) } ) ] ) ) ) } spids: [5697] ) ] ) ] spids: [5691 5694 5715 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:errmsg) op: assign_op.Equal rhs: (word.Empty) spids: [5722] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:total_commits) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 5726 ) command_list: (command.CommandList children: [ (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {($ Id.VSub_DollarName '$mod_src')} {(Id.Lit_Equals '=')} {(160000)} ) (C {(test)} {($ Id.VSub_DollarName '$mod_dst')} {(Id.Lit_Equals '=')} {(160000)} ) ] ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:range) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$sha1_src' ) (...) ($ Id.VSub_DollarName '$sha1_dst') ) } spids: [5753] ) ] ) ] spids: [5729 5750] ) (if_arm cond: [ (C {(test)} {($ Id.VSub_DollarName '$mod_src')} {(Id.Lit_Equals '=')} {(160000)} ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:range) op: assign_op.Equal rhs: { ($ Id.VSub_DollarName '$sha1_src') } spids: [5775] ) ] ) ] spids: [5761 5772] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:range) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$sha1_dst')} spids: [5782] ) ] ) ] ) (command.Pipeline children: [ (command.Simple words: [ {(git)} {(rev-list)} {(--first-parent)} {($ Id.VSub_DollarName '$range')} {(--)} ] more_env: [ (env_pair name: GIT_DIR val: { (DQ ($ Id.VSub_DollarName '$name') (/.git) ) } spids: [5789] ) ] ) (C {(wc)} {(-l)}) ] negated: F ) ] ) ) } spids: [5725] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:total_commits) op: assign_op.Equal rhs: { (DQ (' (') (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$total_commits')} ) right: (arith_expr.ArithWord w:{(Id.Lit_Digits 0)}) ) ) (')') ) } spids: [5817] ) ] ) ] spids: [5718 5719 5832 -1] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sha1_abbr_src) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:5840) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$sha1_src')}) (C {(cut)} {(-c1-7)}) ] negated: F ) ] ) ) } spids: [5839] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sha1_abbr_dst) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:5854) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(echo)} {($ Id.VSub_DollarName '$sha1_dst')}) (C {(cut)} {(-c1-7)}) ] negated: F ) ] ) ) } spids: [5853] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(test)} {($ Id.VSub_DollarName '$status')} {(Id.Lit_Equals '=')} {(T)} ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:blob) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 5883 ) command_list: (command.CommandList children: [(C {(gettext)} {(DQ (blob))})] ) ) ) } spids: [5881] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:submodule) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 5895 ) command_list: (command.CommandList children: [(C {(gettext)} {(DQ (submodule))})] ) ) ) } spids: [5893] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(test)} {($ Id.VSub_DollarName '$mod_dst')} {(Id.Lit_Equals '=')} {(160000)} ) ] action: [ (C {(echo)} { (DQ ('* ') ($ Id.VSub_DollarName '$display_name') (' ') ($ Id.VSub_DollarName '$sha1_abbr_src') ('(') ($ Id.VSub_DollarName '$blob') (')->') ($ Id.VSub_DollarName '$sha1_abbr_dst') ('(') ($ Id.VSub_DollarName '$submodule') (')') ($ Id.VSub_DollarName '$total_commits') (':') ) } ) ] spids: [5905 5916] ) ] else_action: [ (C {(echo)} { (DQ ('* ') ($ Id.VSub_DollarName '$display_name') (' ') ($ Id.VSub_DollarName '$sha1_abbr_src') ('(') ($ Id.VSub_DollarName '$submodule') (')->') ($ Id.VSub_DollarName '$sha1_abbr_dst') ('(') ($ Id.VSub_DollarName '$blob') (')') ($ Id.VSub_DollarName '$total_commits') (':') ) } ) ] ) ] spids: [5867 5878] ) ] else_action: [ (C {(echo)} { (DQ ('* ') ($ Id.VSub_DollarName '$display_name') (' ') ($ Id.VSub_DollarName '$sha1_abbr_src') (...) ($ Id.VSub_DollarName '$sha1_abbr_dst') ($ Id.VSub_DollarName '$total_commits') (':') ) } ) ] ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$errmsg'))})] action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {($ Id.VSub_DollarName '$mod_dst')} {(Id.Lit_Equals '=')} {(160000)} ) (C {(echo)} {(DQ ($ Id.VSub_DollarName '$errmsg'))}) ] ) ] spids: [5983 5994] ) ] else_action: [ (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {($ Id.VSub_DollarName '$mod_src')} {(Id.Lit_Equals '=')} {(160000)} ) (C {(test)} {($ Id.VSub_DollarName '$mod_dst')} {(Id.Lit_Equals '=')} {(160000)} ) ] ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:limit) op: assign_op.Equal rhs: (word.Empty) spids: [6049] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {($ Id.VSub_DollarName '$summary_limit')} {(-gt)} {(0)} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:limit) op: assign_op.Equal rhs: {(DQ (-) ($ Id.VSub_DollarName '$summary_limit'))} spids: [6062] ) ] ) ] ) (command.Simple words: [ {(git)} {(log)} {($ Id.VSub_DollarName '$limit')} {(--pretty) (Id.Lit_Equals '=') (SQ (Token id: Id.Lit_Chars val: 'format: %m %s' span_id: 6086 ) ) } {(--first-parent)} {($ Id.VSub_DollarName '$sha1_src') (...) ($ Id.VSub_DollarName '$sha1_dst') } ] more_env: [ (env_pair name: GIT_DIR val: {(DQ ($ Id.VSub_DollarName '$name') (/.git))} spids: [6069] ) ] ) ] spids: [6025 6046] ) (if_arm cond: [ (C {(test)} {($ Id.VSub_DollarName '$mod_dst')} {(Id.Lit_Equals '=')} {(160000)} ) ] action: [ (command.Simple words: [ {(git)} {(log)} {(--pretty) (Id.Lit_Equals '=') (SQ (Token id: Id.Lit_Chars val: 'format: > %s' span_id: 6127 ) ) } {(-1)} {($ Id.VSub_DollarName '$sha1_dst')} ] more_env: [ (env_pair name: GIT_DIR val: {(DQ ($ Id.VSub_DollarName '$name') (/.git))} spids: [6112] ) ] ) ] spids: [6098 6109] ) ] else_action: [ (command.Simple words: [ {(git)} {(log)} {(--pretty) (Id.Lit_Equals '=') (SQ (Token id:Id.Lit_Chars val:'format: < %s' span_id:6153)) } {(-1)} {($ Id.VSub_DollarName '$sha1_src')} ] more_env: [ (env_pair name: GIT_DIR val: {(DQ ($ Id.VSub_DollarName '$name') (/.git))} spids: [6138] ) ] ) ] ) (C {(echo)}) ] ) (C {(echo)}) ] ) ) ] negated: F ) ] ) ) (command.ShFunction name: cmd_status body: (command.BraceGroup children: [ (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:6218) cond: [(C {(test)} {($ Id.VSub_Pound '$#')} {(-ne)} {(0)})] body: (command.DoGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(-q)} {(--quiet)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_QUIET) op: assign_op.Equal rhs: {(1)} spids: [6247] ) ] ) ] spids: [6241 6244 6251 -1] ) (case_arm pat_list: [{(--cached)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cached) op: assign_op.Equal rhs: {(1)} spids: [6258] ) ] ) ] spids: [6254 6255 6262 -1] ) (case_arm pat_list: [{(--recursive)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:recursive) op: assign_op.Equal rhs: {(1)} spids: [6269] ) ] ) ] spids: [6265 6266 6273 -1] ) (case_arm pat_list: [{(--)}] action: [ (C {(shift)}) (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:6283) ) ] spids: [6276 6277 6286 -1] ) (case_arm pat_list: [{(-) (Id.Lit_Star '*')}] action: [(C {(usage)})] spids: [6289 6291 6297 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:6304) ) ] spids: [6300 6301 6307 -1] ) ] ) (C {(shift)}) ] ) ) (command.Pipeline children: [ (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(git)} {(submodule--helper)} {(list)} {(--prefix)} {(DQ ($ Id.VSub_DollarName '$wt_prefix'))} {(DQ ($ Id.VSub_At '$@'))} ) (C {(echo)} {(DQ ('#unmatched'))} {($ Id.VSub_QMark '$?')}) ] ) ] ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:6356) cond: [(C {(read)} {(mode)} {(sha1)} {(stage)} {(sm_path)})] body: (command.DoGroup children: [ (C {(die_if_unmatched)} {(DQ ($ Id.VSub_DollarName '$mode'))} {(DQ ($ Id.VSub_DollarName '$sha1'))} ) (command.AndOr ops: [Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:name) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 6384 ) command_list: (command.CommandList children: [ (C {(git)} {(submodule--helper)} {(name)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} ) ] ) ) } spids: [6383] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:6398) ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:url) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:6402) command_list: (command.CommandList children: [ (C {(git)} {(config)} {(submodule.) (DQ ($ Id.VSub_DollarName '$name')) (.url)} ) ] ) ) } spids: [6401] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:displaypath) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:6416) command_list: (command.CommandList children: [ (C {(git)} {(submodule--helper)} {(relative-path)} { (DQ ($ Id.VSub_DollarName '$prefix') ($ Id.VSub_DollarName '$sm_path') ) } {(DQ ($ Id.VSub_DollarName '$wt_prefix'))} ) ] ) ) } spids: [6415] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(test)} {(DQ ($ Id.VSub_DollarName '$stage'))} {(Id.Lit_Equals '=')} {(U)} ) ] action: [ (C {(say)} { (DQ (U) ($ Id.VSub_DollarName '$sha1') (' ') ($ Id.VSub_DollarName '$displaypath') ) } ) (command.ControlFlow token: (Token id:Id.ControlFlow_Continue val:continue span_id:6460) ) ] spids: [6434 6447] ) ] ) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$url'))}) (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Pipeline children: [ (C {(test)} {(-d)} {(DQ ($ Id.VSub_DollarName '$sm_path')) (/.git)} ) ] negated: T ) (command.Pipeline children: [ (C {(test)} {(-f)} {(DQ ($ Id.VSub_DollarName '$sm_path')) (/.git)} ) ] negated: T ) ] ) ] ) ] ) ] action: [ (C {(say)} { (DQ (-) ($ Id.VSub_DollarName '$sha1') (' ') ($ Id.VSub_DollarName '$displaypath') ) } ) (command.Sentence child: (command.ControlFlow token: (Token id: Id.ControlFlow_Continue val: continue span_id: 6524 ) ) terminator: (Token id:Id.Op_Semi val:';' span_id:6525) ) ] spids: [6466 6511] ) ] ) (command.If arms: [ (if_arm cond: [ (C {(git)} {(diff-files)} {(--ignore-submodules) (Id.Lit_Equals '=') (dirty)} {(--quiet)} {(--)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} ) ] action: [ (C {(set_name_rev)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} {(DQ ($ Id.VSub_DollarName '$sha1'))} ) (C {(say)} { (DQ (' ') ($ Id.VSub_DollarName '$sha1') (' ') ($ Id.VSub_DollarName '$displaypath') ($ Id.VSub_DollarName '$revname') ) } ) ] spids: [6531 6550] ) ] else_action: [ (command.If arms: [ (if_arm cond: [(C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$cached'))})] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sha1) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 6593 ) command_list: (command.CommandList children: [ (command.Sentence child: (C {(sanitize_submodule_env)}) terminator: (Token id: Id.Op_Semi val: ';' span_id: 6595 ) ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(cd)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} ) (C {(git)} {(rev-parse)} {(--verify)} {(HEAD)}) ] ) ] ) ) } spids: [6592] ) ] ) ] spids: [6578 6589] ) ] ) (C {(set_name_rev)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} {(DQ ($ Id.VSub_DollarName '$sha1'))} ) (C {(say)} { (DQ ('+') ($ Id.VSub_DollarName '$sha1') (' ') ($ Id.VSub_DollarName '$displaypath') ($ Id.VSub_DollarName '$revname') ) } ) ] ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$recursive'))})] action: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Subshell command_list: (command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:prefix) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$displaypath') (/))} spids: [6661] ) ] ) (C {(sanitize_submodule_env)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:wt_prefix) op: assign_op.Equal rhs: (word.Empty) spids: [6671] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(cd)} {(DQ ($ Id.VSub_DollarName '$sm_path'))}) (C {(eval)} {(cmd_status)}) ] ) ] ) ) (C {(die)} { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 6696 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Failed to recurse into submodule path '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 6701 ) ) ("sm_path'") ) } ) ] ) ) ) } ) ] ) ] spids: [6644 6655] ) ] ) ] ) ) ] negated: F ) ] ) ) (command.ShFunction name: cmd_sync body: (command.BraceGroup children: [ (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:6737) cond: [(C {(test)} {($ Id.VSub_Pound '$#')} {(-ne)} {(0)})] body: (command.DoGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(-q)} {(--quiet)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_QUIET) op: assign_op.Equal rhs: {(1)} spids: [6766] ) ] ) (C {(shift)}) ] spids: [6760 6763 6773 -1] ) (case_arm pat_list: [{(--recursive)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:recursive) op: assign_op.Equal rhs: {(1)} spids: [6780] ) ] ) (C {(shift)}) ] spids: [6776 6777 6787 -1] ) (case_arm pat_list: [{(--)}] action: [ (C {(shift)}) (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:6797) ) ] spids: [6790 6791 6800 -1] ) (case_arm pat_list: [{(-) (Id.Lit_Star '*')}] action: [(C {(usage)})] spids: [6803 6805 6811 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:6818) ) ] spids: [6814 6815 6821 -1] ) ] ) ] ) ) (C {(cd_to_toplevel)}) (command.Pipeline children: [ (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(git)} {(submodule--helper)} {(list)} {(--prefix)} {(DQ ($ Id.VSub_DollarName '$wt_prefix'))} {(DQ ($ Id.VSub_At '$@'))} ) (C {(echo)} {(DQ ('#unmatched'))} {($ Id.VSub_QMark '$?')}) ] ) ] ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:6869) cond: [(C {(read)} {(mode)} {(sha1)} {(stage)} {(sm_path)})] body: (command.DoGroup children: [ (C {(die_if_unmatched)} {(DQ ($ Id.VSub_DollarName '$mode'))} {(DQ ($ Id.VSub_DollarName '$sha1'))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:name) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:6897) command_list: (command.CommandList children: [ (C {(git)} {(submodule--helper)} {(name)} {(DQ ($ Id.VSub_DollarName '$sm_path'))} ) ] ) ) } spids: [6896] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:url) op: assign_op.Equal rhs: { (command_sub left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:6911) command_list: (command.CommandList children: [ (C {(git)} {(config)} {(-f)} {(.gitmodules)} {(--get)} {(submodule.) (DQ ($ Id.VSub_DollarName '$name')) (.url)} ) ] ) ) } spids: [6910] ) ] ) (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$url'))} arms: [ (case_arm pat_list: [{(./) (Id.Lit_Star '*')} {(../) (Id.Lit_Star '*')}] action: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DPipe] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:up_path) op: assign_op.Equal rhs: { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 6962 ) command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(printf)} { (SQ (Token id: Id.Lit_Chars val: '%s\\n' span_id: 6966 ) ) } {(DQ ($ Id.VSub_DollarName '$sm_path'))} ) (C {(sed)} {(DQ ('s/[^/][^/]*/../g'))}) ] negated: F ) ] ) ) ) } spids: [6960] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:up_path) op: assign_op.Equal rhs: { (braced_var_sub token: (Token id: Id.VSub_Name val: up_path span_id: 6992 ) suffix_op: (suffix_op.Unary op_id: Id.VOp1_Percent arg_word: {(Id.Lit_Slash /)} ) ) (/) } spids: [6990] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sub_origin_url) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 7006 ) command_list: (command.CommandList children: [ (C {(git)} {(submodule--helper)} {(resolve-relative-url)} {(DQ ($ Id.VSub_DollarName '$url'))} {(DQ ($ Id.VSub_DollarName '$up_path'))} ) ] ) ) } spids: [7005] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:super_config_url) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 7030 ) command_list: (command.CommandList children: [ (C {(git)} {(submodule--helper)} {(resolve-relative-url)} {(DQ ($ Id.VSub_DollarName '$url'))} ) ] ) ) } spids: [7029] ) ] ) (command.ControlFlow token: (Token id:Id.ControlFlow_Exit val:exit span_id:7044) ) ] ) ] spids: [6944 6949 7047 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:sub_origin_url) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$url'))} spids: [7054] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:super_config_url) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$url'))} spids: [7060] ) ] ) ] spids: [7050 7051 7066 -1] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Simple words: [ {(git)} {(config)} {(DQ (submodule.) ($ Id.VSub_DollarName '$name') (.url))} ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:7085) fd: -1 arg_word: {(/dev/null)} ) (redir.Redir op: (Token id:Id.Redir_Great val:'2>' span_id:7088) fd: 2 arg_word: {(/dev/null)} ) ] ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:displaypath) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 7096 ) command_list: (command.CommandList children: [ (C {(git)} {(submodule--helper)} {(relative-path)} { (DQ ($ Id.VSub_DollarName '$prefix') ($ Id.VSub_DollarName '$sm_path') ) } {(DQ ($ Id.VSub_DollarName '$wt_prefix'))} ) ] ) ) } spids: [7095] ) ] ) (C {(say)} { (DQ (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 7117 ) command_list: (command.CommandList children: [ (C {(eval_gettext)} { (DQ ("Synchronizing submodule url for '") (word_part.EscapedLiteral token: (Token id: Id.Lit_EscapedChar val: '\\$' span_id: 7122 ) ) ("displaypath'") ) } ) ] ) ) ) } ) (C {(git)} {(config)} {(submodule.) (DQ ($ Id.VSub_DollarName '$name')) (.url)} {(DQ ($ Id.VSub_DollarName '$super_config_url'))} ) (command.If arms: [ (if_arm cond: [ (C {(test)} {(-e)} {(DQ ($ Id.VSub_DollarName '$sm_path')) (/.git)} ) ] action: [ (command.Subshell command_list: (command.CommandList children: [ (C {(sanitize_submodule_env)}) (C {(cd)} {(DQ ($ Id.VSub_DollarName '$sm_path'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:remote) op: assign_op.Equal rhs: { (command_sub left_token: (Token id: Id.Left_DollarParen val: '$(' span_id: 7174 ) command_list: (command.CommandList children: [(C {(get_default_remote)})] ) ) } spids: [7173] ) ] ) (C {(git)} {(config)} {(remote.) (DQ ($ Id.VSub_DollarName '$remote')) (.url) } {(DQ ($ Id.VSub_DollarName '$sub_origin_url'))} ) (command.If arms: [ (if_arm cond: [ (C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$recursive'))} ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:prefix) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$prefix') ($ Id.VSub_DollarName '$sm_path') (/) ) } spids: [7209] ) ] ) (C {(eval)} {(cmd_sync)}) ] spids: [7195 7206] ) ] ) ] ) ) ] spids: [7145 7157] ) ] ) ] spids: [7073 7092] ) ] ) ] ) ) ] negated: F ) ] ) ) (command.WhileUntil keyword: (Token id:Id.KW_While val:while span_id:7255) cond: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {($ Id.VSub_Pound '$#')} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(0)}) (C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$command'))}) ] ) ] body: (command.DoGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [ {(add)} {(foreach)} {(init)} {(deinit)} {(update)} {(status)} {(summary)} {(sync)} ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:command) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [7320] ) ] ) ] spids: [7288 7317 7324 -1] ) (case_arm pat_list: [{(-q)} {(--quiet)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:GIT_QUIET) op: assign_op.Equal rhs: {(1)} spids: [7333] ) ] ) ] spids: [7327 7330 7337 -1] ) (case_arm pat_list: [{(-b)} {(--branch)}] action: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$2'))} arms: [ (case_arm pat_list: [{(SQ )}] action: [(C {(usage)})] spids: [7355 7357 7363 -1] ) ] ) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:branch) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$2'))} spids: [7369] ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:7373) ) (C {(shift)}) ] spids: [7340 7343 7378 -1] ) (case_arm pat_list: [{(--cached)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cached) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [7385] ) ] ) ] spids: [7381 7382 7391 -1] ) (case_arm pat_list: [{(--)}] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:7398) ) ] spids: [7394 7395 7401 -1] ) (case_arm pat_list: [{(-) (Id.Lit_Star '*')}] action: [(C {(usage)})] spids: [7404 7406 7412 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Break val:break span_id:7419) ) ] spids: [7415 7416 7422 -1] ) ] ) (C {(shift)}) ] ) ) (command.If arms: [ (if_arm cond: [(C {(test)} {(-z)} {(DQ ($ Id.VSub_DollarName '$command'))})] action: [ (command.If arms: [ (if_arm cond: [(C {(test)} {($ Id.VSub_Pound '$#')} {(Id.Lit_Equals '=')} {(0)})] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:command) op: assign_op.Equal rhs: {(status)} spids: [7463] ) ] ) ] spids: [7449 7460] ) ] else_action: [(C {(usage)})] ) ] spids: [7436 7446] ) ] ) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$branch'))}) (C {(test)} {(DQ ($ Id.VSub_DollarName '$command'))} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(add)} ) ] ) ] action: [(C {(usage)})] spids: [7481 7504] ) ] ) (command.If arms: [ (if_arm cond: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (C {(test)} {(-n)} {(DQ ($ Id.VSub_DollarName '$cached'))}) (C {(test)} {(DQ ($ Id.VSub_DollarName '$command'))} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(status)} ) (C {(test)} {(DQ ($ Id.VSub_DollarName '$command'))} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(summary)} ) ] ) ] action: [(C {(usage)})] spids: [7515 7551] ) ] ) (C {(DQ (cmd_) ($ Id.VSub_DollarName '$command'))} {(DQ ($ Id.VSub_At '$@'))}) ] )