(List (Com {[LIT_OTHER ":"]} {[VarSub MERGE_TOOLS_DIR test_op=VS_TEST_EQUALS {[ComSub (Com {[LIT_CHARS git]} {[LIT_CHARS --exec-path]})] [LIT_SLASH /] [LIT_CHARS mergetools]}]}) (= scope= flags=0 words=[] bindings=[('IFS', {[SQ ]})]) (FunctionDef mode_ok [] (If (Com {[LIT_CHARS diff_mode]}) (Com {[LIT_CHARS can_diff]}) (Com {[LIT_CHARS merge_mode]}) (Com {[LIT_CHARS can_merge]}) (ElseTrue) (Com {[LIT_CHARS false]}) ) ) (FunctionDef is_available [] (AndOr OP_AND_IF (= scope= flags=0 words=[] bindings=[('merge_tool_path', {[ComSub (Com {[LIT_CHARS translate_merge_tool_path]} {[DQ [VarSub 1]]})]})]) (Com {[LIT_CHARS type]} {[DQ [VarSub merge_tool_path]]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) ) ) (FunctionDef list_config_tools [] (List (= scope= flags=0 words=[] bindings=[('section', {[VarSub 1]})]) (= scope= flags=0 words=[] bindings=[('line_prefix', {[VarSub 2 test_op=VS_TEST_COLON_HYPHEN {}]})]) (Pipeline (Com {[LIT_CHARS git]} {[LIT_CHARS config]} {[LIT_CHARS --get-regexp]} {[VarSub section] [SQ ]}) (While (Com {[LIT_CHARS read]} {[LIT_CHARS -r]} {[LIT_CHARS key]} {[LIT_CHARS value]}) (List (= scope= flags=0 words=[] bindings=[('toolname', {[VarSub key transform_ops=[VS_UNARY_POUND {[VarSub section] [LIT_CHARS .]}]]})]) (= scope= flags=0 words=[] bindings=[('toolname', {[VarSub toolname transform_ops=[VS_UNARY_PERCENT {[LIT_CHARS .cmd]}]]})]) (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS "%s%s"][\ LIT_ESCAPED_CHAR "\\n"]]} {[DQ [VarSub line_prefix]]} {[DQ [VarSub toolname]]}) ) ) ) ) ) (FunctionDef show_tool_names [] (List (= scope= flags=0 words=[] bindings=[('condition', {[VarSub 1 test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS true]}]}), ('per_line_prefix', {[VarSub 2 test_op=VS_TEST_COLON_HYPHEN {}]}), ('preamble', {[VarSub 3 test_op=VS_TEST_COLON_HYPHEN {}]})]) (= scope= flags=0 words=[] bindings=[('not_found_msg', {[VarSub 4 test_op=VS_TEST_COLON_HYPHEN {}]})]) (= scope= flags=0 words=[] bindings=[('extra_content', {[VarSub 5 test_op=VS_TEST_COLON_HYPHEN {}]})]) (= scope= flags=0 words=[] bindings=[('shown_any', {[SQ ]})]) (Pipeline (Subshell (AndOr OP_AND_IF (Com {[LIT_CHARS cd]} {[DQ [VarSub MERGE_TOOLS_DIR]]}) (Com {[LIT_CHARS ls]}) ) ) (List (While (Com {[LIT_CHARS read]} {[LIT_CHARS toolname]}) (If (AndOr OP_AND_IF (Com {[LIT_CHARS setup_tool]} {[DQ [VarSub toolname]]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 2), > ) (Subshell (Com {[LIT_CHARS eval]} {[DQ [VarSub condition]]} {[DQ [VarSub toolname]]}) ) ) (List (If (Com {[LIT_CHARS test]} {[LIT_CHARS -n]} {[DQ [VarSub preamble]]}) (List (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS "%s"][\ LIT_ESCAPED_CHAR "\\n"]]} {[DQ [VarSub preamble]]}) (= scope= flags=0 words=[] bindings=[('preamble', {[SQ ]})]) ) ) (= scope= flags=0 words=[] bindings=[('shown_any', {[LIT_CHARS yes]})]) (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS "%s%s"][\ LIT_ESCAPED_CHAR "\\n"]]} {[DQ [VarSub per_line_prefix]]} {[DQ [VarSub toolname]]}) ) ) ) (If (Com {[LIT_CHARS test]} {[LIT_CHARS -n]} {[DQ [VarSub extra_content]]}) (List (If (Com {[LIT_CHARS test]} {[LIT_CHARS -n]} {[DQ [VarSub preamble]]}) (List (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS "%s"]]} {[DQ [VarSub preamble]]}) (= scope= flags=0 words=[] bindings=[('preamble', {[SQ ]})]) ) ) (= scope= flags=0 words=[] bindings=[('shown_any', {[LIT_CHARS yes]})]) (Com {[LIT_CHARS printf]} {[DQ [\ LIT_ESCAPED_CHAR "\\n"][LIT_CHARS "%s"][\ LIT_ESCAPED_CHAR "\\n"]]} {[DQ [VarSub extra_content]]}) ) ) (If (AndOr OP_AND_IF (Com {[LIT_CHARS test]} {[LIT_CHARS -n]} {[DQ [VarSub preamble]]}) (Com {[LIT_CHARS test]} {[LIT_CHARS -n]} {[DQ [VarSub not_found_msg]]}) ) (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS "%s"][\ LIT_ESCAPED_CHAR "\\n"]]} {[DQ [VarSub not_found_msg]]}) ) (Com {[LIT_CHARS test]} {[LIT_CHARS -n]} {[DQ [VarSub shown_any]]}) ) ) ) ) (FunctionDef diff_mode [] (Com {[LIT_CHARS test]} {[DQ [VarSub TOOL_MODE]]} {[LIT_OTHER "="]} {[LIT_CHARS diff]}) ) (FunctionDef merge_mode [] (Com {[LIT_CHARS test]} {[DQ [VarSub TOOL_MODE]]} {[LIT_OTHER "="]} {[LIT_CHARS merge]}) ) (FunctionDef translate_merge_tool_path [] (Com {[LIT_CHARS echo]} {[DQ [VarSub 1]]}) ) (FunctionDef check_unchanged [] (If (Com {[LIT_CHARS test]} {[DQ [VarSub MERGED]]} {[LIT_CHARS -nt]} {[DQ [VarSub BACKUP]]}) (Com {[LIT_CHARS return]} {[LIT_CHARS 0]}) (ElseTrue) (While (Com {[LIT_CHARS true]}) (List (Com {[LIT_CHARS echo]} {[DQ [VarSub MERGED][LIT_CHARS " seems unchanged."]]}) (Com {[LIT_CHARS printf]} {[DQ [LIT_CHARS "Was the merge successful [y/n]? "]]}) (AndOr OP_OR_IF (Com {[LIT_CHARS read]} {[LIT_CHARS answer]}) (Com {[LIT_CHARS return]} {[LIT_CHARS 1]}) ) (Case to_match={[DQ [VarSub answer]]}, pat_word_list=[[{[LIT_CHARS y] [LIT_OTHER "*"]}, {[LIT_CHARS Y] [LIT_OTHER "*"]}], [{[LIT_CHARS n] [LIT_OTHER "*"]}, {[LIT_CHARS N] [LIT_OTHER "*"]}]] (Com {[LIT_CHARS return]} {[LIT_CHARS 0]}) (Com {[LIT_CHARS return]} {[LIT_CHARS 1]}) ) ) ) ) ) (FunctionDef valid_tool [] (List (AndOr OP_AND_IF (Com {[LIT_CHARS setup_tool]} {[DQ [VarSub 1]]}) (Com {[LIT_CHARS return]} {[LIT_CHARS 0]}) ) (= scope= flags=0 words=[] bindings=[('cmd', {[ComSub (Com {[LIT_CHARS get_merge_tool_cmd]} {[DQ [VarSub 1]]})]})]) (Com {[LIT_CHARS test]} {[LIT_CHARS -n]} {[DQ [VarSub cmd]]}) ) ) (FunctionDef setup_user_tool [] (List (= scope= flags=0 words=[] bindings=[('merge_tool_cmd', {[ComSub (Com {[LIT_CHARS get_merge_tool_cmd]} {[DQ [VarSub tool]]})]})]) (AndOr OP_OR_IF (Com {[LIT_CHARS test]} {[LIT_CHARS -n]} {[DQ [VarSub merge_tool_cmd]]}) (Com {[LIT_CHARS return]} {[LIT_CHARS 1]}) ) (FunctionDef diff_cmd [] (Subshell (Com {[LIT_CHARS eval]} {[VarSub merge_tool_cmd]}) ) ) (FunctionDef merge_cmd [] (List (= scope= flags=0 words=[] bindings=[('trust_exit_code', {[ComSub (AndOr OP_OR_IF (Com {[LIT_CHARS git]} {[LIT_CHARS config]} {[LIT_CHARS --bool]} {[DQ [LIT_CHARS mergetool.][VarSub 1][LIT_CHARS .trustExitCode]]}) (Com {[LIT_CHARS echo]} {[LIT_CHARS false]}) )]})]) (If (Com {[LIT_CHARS test]} {[DQ [VarSub trust_exit_code]]} {[LIT_OTHER "="]} {[DQ [LIT_CHARS false]]}) (List (Com {[LIT_CHARS touch]} {[DQ [VarSub BACKUP]]}) (Subshell (Com {[LIT_CHARS eval]} {[VarSub merge_tool_cmd]}) ) (Com {[LIT_CHARS check_unchanged]}) ) (ElseTrue) (Subshell (Com {[LIT_CHARS eval]} {[VarSub merge_tool_cmd]}) ) ) ) ) ) ) (FunctionDef setup_tool [] (List (= scope= flags=0 words=[] bindings=[('tool', {[DQ [VarSub 1]]})]) (FunctionDef can_merge [] (Com {[LIT_CHARS return]} {[LIT_CHARS 0]}) ) (FunctionDef can_diff [] (Com {[LIT_CHARS return]} {[LIT_CHARS 0]}) ) (FunctionDef diff_cmd [] (Com {[LIT_CHARS return]} {[LIT_CHARS 1]}) ) (FunctionDef merge_cmd [] (Com {[LIT_CHARS return]} {[LIT_CHARS 1]}) ) (FunctionDef translate_merge_tool_path [] (Com {[LIT_CHARS echo]} {[DQ [VarSub 1]]}) ) (If (Pipeline! (Com {[LIT_CHARS test]} {[LIT_CHARS -f]} {[DQ [VarSub MERGE_TOOLS_DIR][LIT_CHARS /][VarSub tool]]}) ) (List (Com {[LIT_CHARS setup_user_tool]}) (Com {[LIT_CHARS return]} {[VarSub ?]}) ) ) (Com {[LIT_CHARS .]} {[DQ [VarSub MERGE_TOOLS_DIR][LIT_CHARS /][VarSub tool]]}) (Com {[LIT_CHARS setup_user_tool]}) (If (AndOr OP_AND_IF (Com {[LIT_CHARS merge_mode]}) (Pipeline! (Com {[LIT_CHARS can_merge]}) ) ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "error: '"][VarSub tool][LIT_CHARS "' can not be used to resolve merges"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS return]} {[LIT_CHARS 1]}) ) (AndOr OP_AND_IF (Com {[LIT_CHARS diff_mode]}) (Pipeline! (Com {[LIT_CHARS can_diff]}) ) ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "error: '"][VarSub tool][LIT_CHARS "' can only be used to resolve merges"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS return]} {[LIT_CHARS 1]}) ) ) (Com {[LIT_CHARS return]} {[LIT_CHARS 0]}) ) ) (FunctionDef get_merge_tool_cmd [] (List (= scope= flags=0 words=[] bindings=[('merge_tool', {[DQ [VarSub 1]]})]) (If (Com {[LIT_CHARS diff_mode]}) (AndOr OP_OR_IF (Com {[LIT_CHARS git]} {[LIT_CHARS config]} {[DQ [LIT_CHARS difftool.][VarSub merge_tool][LIT_CHARS .cmd]]}) (Com {[LIT_CHARS git]} {[LIT_CHARS config]} {[DQ [LIT_CHARS mergetool.][VarSub merge_tool][LIT_CHARS .cmd]]}) ) (ElseTrue) (Com {[LIT_CHARS git]} {[LIT_CHARS config]} {[DQ [LIT_CHARS mergetool.][VarSub merge_tool][LIT_CHARS .cmd]]}) ) ) ) (FunctionDef run_merge_tool [] (List (= scope= flags=0 words=[] bindings=[('GIT_PREFIX', {[VarSub GIT_PREFIX test_op=VS_TEST_COLON_HYPHEN {[LIT_CHARS .]}]})]) (= scope= flags=1 words=[{[LIT_CHARS GIT_PREFIX]}] bindings=[]) (AndOr OP_OR_IF (= scope= flags=0 words=[] bindings=[('merge_tool_path', {[ComSub (Com {[LIT_CHARS get_merge_tool_path]} {[DQ [VarSub 1]]})]})]) (Com {[LIT_CHARS exit]}) ) (= scope= flags=0 words=[] bindings=[('base_present', {[DQ [VarSub 2]]})]) (AndOr OP_OR_IF (Com {[LIT_CHARS setup_tool]} {[DQ [VarSub 1]]}) (Com {[LIT_CHARS return]} {[LIT_CHARS 1]}) ) (If (Com {[LIT_CHARS merge_mode]}) (Com {[LIT_CHARS run_merge_cmd]} {[DQ [VarSub 1]]}) (ElseTrue) (Com {[LIT_CHARS run_diff_cmd]} {[DQ [VarSub 1]]}) ) ) ) (FunctionDef run_diff_cmd [] (Com {[LIT_CHARS diff_cmd]} {[DQ [VarSub 1]]}) ) (FunctionDef run_merge_cmd [] (Com {[LIT_CHARS merge_cmd]} {[DQ [VarSub 1]]}) ) (FunctionDef list_merge_tool_candidates [] (List (If (Com {[LIT_CHARS merge_mode]}) (= scope= flags=0 words=[] bindings=[('tools', {[DQ [LIT_CHARS tortoisemerge]]})]) (ElseTrue) (= scope= flags=0 words=[] bindings=[('tools', {[DQ [LIT_CHARS kompare]]})]) ) (If (Com {[LIT_CHARS test]} {[LIT_CHARS -n]} {[DQ [VarSub DISPLAY]]}) (List (If (Com {[LIT_CHARS test]} {[LIT_CHARS -n]} {[DQ [VarSub GNOME_DESKTOP_SESSION_ID]]}) (= scope= flags=0 words=[] bindings=[('tools', {[DQ [LIT_CHARS "meld opendiff kdiff3 tkdiff xxdiff "][VarSub tools]]})]) (ElseTrue) (= scope= flags=0 words=[] bindings=[('tools', {[DQ [LIT_CHARS "opendiff kdiff3 tkdiff xxdiff meld "][VarSub tools]]})]) ) (= scope= flags=0 words=[] bindings=[('tools', {[DQ [VarSub tools][LIT_CHARS " gvimdiff diffuse diffmerge ecmerge"]]})]) (= scope= flags=0 words=[] bindings=[('tools', {[DQ [VarSub tools][LIT_CHARS " p4merge araxis bc codecompare"]]})]) ) ) (Case to_match={[DQ [VarSub VISUAL test_op=VS_TEST_COLON_HYPHEN {[VarSub EDITOR]}]]}, pat_word_list=[[{[LIT_OTHER "*"] [LIT_CHARS vim] [LIT_OTHER "*"]}], [{[LIT_OTHER "*"]}]] (= scope= flags=0 words=[] bindings=[('tools', {[DQ [VarSub tools][LIT_CHARS " vimdiff emerge"]]})]) (= scope= flags=0 words=[] bindings=[('tools', {[DQ [VarSub tools][LIT_CHARS " emerge vimdiff"]]})]) ) ) ) (FunctionDef show_tool_help [] (List (= scope= flags=0 words=[] bindings=[('tool_opt', {[DQ [LIT_CHARS "'git "][VarSub TOOL_MODE][LIT_CHARS "tool --tool='"]]})]) (= scope= flags=0 words=[] bindings=[('tab', {[SQ ]})]) (= scope= flags=0 words=[] bindings=[('LF', {[SQ ]})]) (= scope= flags=0 words=[] bindings=[('any_shown', {[LIT_CHARS no]})]) (= scope= flags=0 words=[] bindings=[('cmd_name', {[VarSub TOOL_MODE] [LIT_CHARS tool]})]) (= scope= flags=0 words=[] bindings=[('config_tools', {[ComSub (Pipeline (List (AndOr OP_AND_IF (Com {[LIT_CHARS diff_mode]}) (Com {[LIT_CHARS list_config_tools]} {[LIT_CHARS difftool]} {[DQ [VarSub tab][VarSub tab]]}) ) (Com {[LIT_CHARS list_config_tools]} {[LIT_CHARS mergetool]} {[DQ [VarSub tab][VarSub tab]]}) ) (Com {[LIT_CHARS sort]}) )]})]) (= scope= flags=0 words=[] bindings=[('extra_content', {[SQ ]})]) (If (Com {[LIT_CHARS test]} {[LIT_CHARS -n]} {[DQ [VarSub config_tools]]}) (= scope= flags=0 words=[] bindings=[('extra_content', {[DQ [VarSub tab][LIT_CHARS "user-defined:"][VarSub LF][VarSub config_tools]]})]) ) (AndOr OP_AND_IF (Com {[LIT_CHARS show_tool_names]} {[SQ ]} {[DQ [VarSub tab][VarSub tab]]} {[DQ [VarSub tool_opt][LIT_CHARS " may be set to one of the following:"]]} {[DQ [LIT_CHARS "No suitable tool for 'git "][VarSub cmd_name][LIT_CHARS " --tool=' found."]]} {[DQ [VarSub extra_content]]}) (= scope= flags=0 words=[] bindings=[('any_shown', {[LIT_CHARS yes]})]) ) (AndOr OP_AND_IF (Com {[LIT_CHARS show_tool_names]} {[SQ ]} {[DQ [VarSub tab][VarSub tab]]} {[DQ [VarSub LF][LIT_CHARS "The following tools are valid, but not currently available:"]]}) (= scope= flags=0 words=[] bindings=[('any_shown', {[LIT_CHARS yes]})]) ) (If (Com {[LIT_CHARS test]} {[DQ [VarSub any_shown]]} {[LIT_OTHER "="]} {[LIT_CHARS yes]}) (List (Com {[LIT_CHARS echo]}) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Some of the tools listed above only work in a windowed"]]}) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "environment. If run in a terminal-only session, they will fail."]]}) ) ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 0]}) ) ) (FunctionDef guess_merge_tool [] (List (Com {[LIT_CHARS list_merge_tool_candidates]}) (Com {[LIT_CHARS cat]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), (HereDocRedirectNode here_end='EOF' do_expansion=True body_word={[DQ [LIT_CHARS "\n"][LIT_CHARS "This message is displayed because '"][VarSub TOOL_MODE][LIT_CHARS ".tool' is not configured.\n"][LIT_CHARS "See 'git "][VarSub TOOL_MODE][LIT_CHARS "tool --tool-help' or 'git help config' for more details.\n"][LIT_CHARS "'git "][VarSub TOOL_MODE][LIT_CHARS "tool' will now attempt to use one of the following tools:\n"][VarSub tools][LIT_CHARS "\n"]]} 0), > ) (= scope= flags=0 words=[] bindings=[('IFS', {[SQ ]})]) (For tool [{[VarSub tools]}]) (AndOr OP_AND_IF (Com {[LIT_CHARS is_available]} {[DQ [VarSub tool]]}) (AndOr OP_AND_IF (Com {[LIT_CHARS echo]} {[DQ [VarSub tool]]}) (Com {[LIT_CHARS return]} {[LIT_CHARS 0]}) ) ) ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "No known "][VarSub TOOL_MODE][LIT_CHARS " tool is available."]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS return]} {[LIT_CHARS 1]}) ) ) (FunctionDef get_configured_merge_tool [] (List (If (Com {[LIT_CHARS diff_mode]}) (= scope= flags=0 words=[] bindings=[('merge_tool', {[ComSub (AndOr OP_OR_IF (Com {[LIT_CHARS git]} {[LIT_CHARS config]} {[LIT_CHARS diff.tool]}) (Com {[LIT_CHARS git]} {[LIT_CHARS config]} {[LIT_CHARS merge.tool]}) )]})]) (ElseTrue) (= scope= flags=0 words=[] bindings=[('merge_tool', {[ComSub (Com {[LIT_CHARS git]} {[LIT_CHARS config]} {[LIT_CHARS merge.tool]})]})]) ) (If (AndOr OP_AND_IF (Com {[LIT_CHARS test]} {[LIT_CHARS -n]} {[DQ [VarSub merge_tool]]}) (Pipeline! (Com {[LIT_CHARS valid_tool]} {[DQ [VarSub merge_tool]]}) ) ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "git config option "][VarSub TOOL_MODE][LIT_CHARS ".tool set to unknown tool: "][VarSub merge_tool]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Resetting to default..."]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS return]} {[LIT_CHARS 1]}) ) ) (Com {[LIT_CHARS echo]} {[DQ [VarSub merge_tool]]}) ) ) (FunctionDef get_merge_tool_path [] (List (= scope= flags=0 words=[] bindings=[('merge_tool', {[DQ [VarSub 1]]})]) (If (Pipeline! (Com {[LIT_CHARS valid_tool]} {[DQ [VarSub merge_tool]]}) ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "Unknown merge tool "][VarSub merge_tool]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]}) ) ) (If (Com {[LIT_CHARS diff_mode]}) (= scope= flags=0 words=[] bindings=[('merge_tool_path', {[ComSub (AndOr OP_OR_IF (Com {[LIT_CHARS git]} {[LIT_CHARS config]} {[LIT_CHARS difftool.] [DQ [VarSub merge_tool]] [LIT_CHARS .path]}) (Com {[LIT_CHARS git]} {[LIT_CHARS config]} {[LIT_CHARS mergetool.] [DQ [VarSub merge_tool]] [LIT_CHARS .path]}) )]})]) (ElseTrue) (= scope= flags=0 words=[] bindings=[('merge_tool_path', {[ComSub (Com {[LIT_CHARS git]} {[LIT_CHARS config]} {[LIT_CHARS mergetool.] [DQ [VarSub merge_tool]] [LIT_CHARS .path]})]})]) ) (If (Com {[LIT_CHARS test]} {[LIT_CHARS -z]} {[DQ [VarSub merge_tool_path]]}) (= scope= flags=0 words=[] bindings=[('merge_tool_path', {[ComSub (Com {[LIT_CHARS translate_merge_tool_path]} {[DQ [VarSub merge_tool]]})]})]) ) (If (AndOr OP_AND_IF (Com {[LIT_CHARS test]} {[LIT_CHARS -z]} {[DQ [ComSub (Com {[LIT_CHARS get_merge_tool_cmd]} {[DQ [VarSub merge_tool]]})]]}) (Pipeline! (Com {[LIT_CHARS type]} {[DQ [VarSub merge_tool_path]]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) ) ) (List (Com {[LIT_CHARS echo]} {[DQ [LIT_CHARS "The "][VarSub TOOL_MODE][LIT_CHARS " tool "][VarSub merge_tool][LIT_CHARS " is not available as"]]} {[DQ [LIT_CHARS "'"][VarSub merge_tool_path][LIT_CHARS "'"]]} < (DescriptorRedirectNode target={[LIT_CHARS 2]} &"> 1), > ) (Com {[LIT_CHARS exit]} {[LIT_CHARS 1]}) ) ) (Com {[LIT_CHARS echo]} {[DQ [VarSub merge_tool_path]]}) ) ) (FunctionDef get_merge_tool [] (List (= scope= flags=0 words=[] bindings=[('merge_tool', {[ComSub (Com {[LIT_CHARS get_configured_merge_tool]})]})]) (If (Com {[LIT_CHARS test]} {[LIT_CHARS -z]} {[DQ [VarSub merge_tool]]}) (AndOr OP_OR_IF (= scope= flags=0 words=[] bindings=[('merge_tool', {[ComSub (Com {[LIT_CHARS guess_merge_tool]})]})]) (Com {[LIT_CHARS exit]}) ) ) (Com {[LIT_CHARS echo]} {[DQ [VarSub merge_tool]]}) ) ) (FunctionDef mergetool_find_win32_cmd [] (List (= scope= flags=0 words=[] bindings=[('executable', {[VarSub 1]})]) (= scope= flags=0 words=[] bindings=[('sub_directory', {[VarSub 2]})]) (If (Com {[LIT_CHARS type]} {[LIT_CHARS -p]} {[DQ [VarSub executable]]} < (FilenameRedirectNode filename={[LIT_CHARS /dev/null]} "> 1), (DescriptorRedirectNode target={[LIT_CHARS 1]} &"> 2), > ) (List (Com {[LIT_CHARS printf]} {[SQ ]} {[DQ [VarSub executable]]}) (Com {[LIT_CHARS return]}) ) ) (For directory [{[ComSub (Pipeline (Com {[LIT_CHARS env]}) (Com {[LIT_CHARS grep]} {[LIT_CHARS -Ei]} {[SQ ]} {[LIT_CHARS -f]} {[LIT_CHARS 2-]}) (Com {[LIT_CHARS sort]} {[LIT_CHARS -u]}) )]}]) (If (AndOr OP_AND_IF (Com {[LIT_CHARS test]} {[LIT_CHARS -n]} {[DQ [VarSub directory]]}) (Com {[LIT_CHARS test]} {[LIT_CHARS -x]} {[DQ [VarSub directory][LIT_CHARS /][VarSub sub_directory][LIT_CHARS /][VarSub executable]]}) ) (List (Com {[LIT_CHARS printf]} {[SQ ]} {[DQ [VarSub directory][LIT_CHARS /][VarSub sub_directory][LIT_CHARS /][VarSub executable]]}) (Com {[LIT_CHARS return]}) ) ) ) (Com {[LIT_CHARS printf]} {[SQ ]} {[DQ [VarSub executable]]}) ) ) )