(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ <'CRLF conversion all combinations'>)} spids: [4] ) ] ) (C {<.>} {<'./test-lib.sh'>}) (command.If arms: [ (if_arm cond: [(command.Pipeline children:[(C {<test_have_prereq>} {<EXPENSIVE>})] negated:T)] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:skip_all) op: assign_op.Equal rhs: {(DQ <'EXPENSIVE not set'>)} spids: [26] ) ] ) (C {<test_done>}) ] spids: [15 23] ) ] ) (command.ShFunction name: compare_files body: (BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp] children: [ (command.Simple words: [{<tr>} {(SQ <'\\015\\000'>)} {<QN>}] redirects: [ (redir op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {(DQ ($ Id.VSub_Number '$1'))} ) (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_Number '$1')) <.expect>} ) ] do_fork: T ) (command.Pipeline children: [ (command.Simple words: [{<tr>} {(SQ <'\\015\\000'>)} {<QN>}] redirects: [ (redir op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {(DQ ($ Id.VSub_Number '$2'))} ) ] do_fork: T ) (command.Simple words: [{<tr>} {<-d>} {(SQ <Z>)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_Number '$2')) <.actual>} ) ] do_fork: T ) ] negated: F ) (C {<test_cmp>} {(DQ ($ Id.VSub_Number '$1')) <.expect>} {(DQ ($ Id.VSub_Number '$2')) <.actual>} ) (C {<rm>} {(DQ ($ Id.VSub_Number '$1')) <.expect>} {(DQ ($ Id.VSub_Number '$2')) <.actual>} ) ] ) ] ) ) (command.ShFunction name: compare_ws_file body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pfx) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [137] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:exp) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2') <.expect>} spids: [141] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:act) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$pfx') <.actual.> ($ Id.VSub_Number '$3')} spids: [146] ) ] ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp] children: [ (command.Simple words: [{<tr>} {(SQ <'\\015\\000abcdef0123456789'>)} {<QN00000000000000000>}] redirects: [ (redir op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {(DQ ($ Id.VSub_Number '$2'))} ) (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_DollarName '$exp'))} ) ] do_fork: T ) (command.Simple words: [{<tr>} {(SQ <'\\015\\000abcdef0123456789'>)} {<QN00000000000000000>}] redirects: [ (redir op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {(DQ ($ Id.VSub_Number '$3'))} ) (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_DollarName '$act'))} ) ] do_fork: T ) (C {<test_cmp>} {(DQ ($ Id.VSub_DollarName '$exp'))} {(DQ ($ Id.VSub_DollarName '$act'))}) (C {<rm>} {(DQ ($ Id.VSub_DollarName '$exp'))} {(DQ ($ Id.VSub_DollarName '$act'))}) ] ) ] ) ) (command.ShFunction name: create_gitattributes body: (BraceGroup children: [ (BraceGroup children: [ (command.WhileUntil keyword: <Id.KW_While while> cond: [ (C {<test>} {(DQ ($ Id.VSub_Pound '$#'))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<0>} ) ] body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [{<auto>}] action: [(C {<echo>} {(SQ <'*.txt text=auto'>)})] spids: [257 258 266 -1] ) (case_arm pat_list: [{<ident>}] action: [(C {<echo>} {(SQ <'*.txt ident'>)})] spids: [269 270 278 -1] ) (case_arm pat_list: [{<text>}] action: [(C {<echo>} {(SQ <'*.txt text'>)})] spids: [281 282 290 -1] ) (case_arm pat_list: [{<-text>}] action: [(C {<echo>} {(SQ <'*.txt -text'>)})] spids: [293 294 302 -1] ) (case_arm pat_list: [{<crlf>}] action: [(C {<echo>} {(SQ <'*.txt eol=crlf'>)})] spids: [305 306 314 -1] ) (case_arm pat_list: [{<lf>}] action: [(C {<echo>} {(SQ <'*.txt eol=lf'>)})] spids: [317 318 326 -1] ) (case_arm pat_list: [{(DQ )}] spids: [329 331 333 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.Simple words: [ {<echo>} {<invalid>} {<attribute> <Id.Lit_Colon ':'>} {(DQ ($ Id.VSub_Number '$1'))} ] redirects: [ (redir op: <Id.Redir_GreatAnd '>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [336 337 360 -1] ) ] ) (C {<shift>}) ] ) ] ) ) ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<.gitattributes>} ) ] ) ] ) ) (command.ShFunction name: create_NNO_files body: (BraceGroup children: [ (command.ForEach iter_name: crlf iter_words: [{<false>} {<true>} {<input>}] do_arg_iter: F body: (command.DoGroup children: [ (command.ForEach iter_name: attr iter_words: [{(DQ )} {<auto>} {<text>} {<-text>}] do_arg_iter: F body: (command.DoGroup children: [ (command.ForEach iter_name: aeol iter_words: [{(DQ )} {<lf>} {<crlf>}] do_arg_iter: F body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pfx) op: assign_op.Equal rhs: {<NNO_attr_> (${ Id.VSub_Name attr) <_aeol_> (${ Id.VSub_Name aeol) <_> (${ Id.VSub_Name crlf) } spids: [442] ) ] ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp] children: [ (C {<cp>} {<CRLF_mix_LF>} {(${ Id.VSub_Name pfx) <_LF.txt>}) (C {<cp>} {<CRLF_mix_LF>} {(${ Id.VSub_Name pfx) <_CRLF.txt>}) (C {<cp>} {<CRLF_mix_LF>} {(${ Id.VSub_Name pfx) <_CRLF_mix_LF.txt>} ) (C {<cp>} {<CRLF_mix_LF>} {(${ Id.VSub_Name pfx) <_LF_mix_CR.txt>} ) (C {<cp>} {<CRLF_mix_LF>} {(${ Id.VSub_Name pfx) <_CRLF_nul.txt>} ) ] ) ] ) ) ] ) ) ] ) ) ] ) ) (command.ShFunction name: check_warning body: (BraceGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [{<LF_CRLF>}] action: [ (command.Simple words: [{<echo>} {(DQ <'warning: LF will be replaced by CRLF'>)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_Number '$2')) <.expect>} ) ] do_fork: T ) ] spids: [543 544 558 -1] ) (case_arm pat_list: [{<CRLF_LF>}] action: [ (command.Simple words: [{<echo>} {(DQ <'warning: CRLF will be replaced by LF'>)}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_Number '$2')) <.expect>} ) ] do_fork: T ) ] spids: [561 562 576 -1] ) (case_arm pat_list: [{(SQ )}] action: [ (command.Simple redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_Number '$2')) <.expect>} ) ] do_fork: F ) ] spids: [579 581 589 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.Sentence child: (command.Simple words: [ {<echo>} {(DQ <'Illegal 1'>) <Id.Lit_Colon ':'>} {(DQ ($ Id.VSub_Number '$1'))} ] redirects: [ (redir op: <Id.Redir_GreatAnd '>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<false>} ) ] spids: [592 593 615 -1] ) ] ) (command.Pipeline children: [ (C {<grep>} {(DQ <'will be replaced by'>)} {(DQ ($ Id.VSub_Number '$2'))}) (C {<sed>} {<-e>} { (DQ <'s/'> <Id.Lit_Other '\\'> <'(.*'> <Id.Lit_Other '\\'> <') in [^ ]*'> <Id.Lit_Other '$'> <'/'> <Id.Lit_Other '\\'> <'1/'> ) } ) (command.Simple words: [{<uniq>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_Number '$2')) <.actual>} ) ] do_fork: T ) ] negated: F ) (C {<test_cmp>} {(DQ ($ Id.VSub_Number '$2')) <.expect>} {(DQ ($ Id.VSub_Number '$2')) <.actual>} ) ] ) ) (command.ShFunction name: commit_check_warn body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:crlf) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [683] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:attr) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [687] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lfname) op: assign_op.Equal rhs: {($ Id.VSub_Number '$3')} spids: [691] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:crlfname) op: assign_op.Equal rhs: {($ Id.VSub_Number '$4')} spids: [695] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lfmixcrlf) op: assign_op.Equal rhs: {($ Id.VSub_Number '$5')} spids: [699] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lfmixcr) op: assign_op.Equal rhs: {($ Id.VSub_Number '$6')} spids: [703] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:crlfnul) op: assign_op.Equal rhs: {($ Id.VSub_Number '$7')} spids: [707] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pfx) op: assign_op.Equal rhs: {<crlf_> (${ Id.VSub_Name crlf) <_attr_> (${ Id.VSub_Name attr)} spids: [711] ) ] ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp] children: [ (C {<create_gitattributes>} {(DQ ($ Id.VSub_DollarName '$attr'))}) (command.ForEach iter_name: f iter_words: [{<LF>} {<CRLF>} {<LF_mix_CR>} {<CRLF_mix_LF>} {<LF_nul>} {<CRLF_nul>}] do_arg_iter: F body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fname) op: assign_op.Equal rhs: {(${ Id.VSub_Name pfx) <_> ($ Id.VSub_DollarName '$f') <.txt>} spids: [753] ) ] ) (C {<cp>} {($ Id.VSub_DollarName '$f')} {($ Id.VSub_DollarName '$fname')}) (command.Simple words: [ {<git>} {<-c>} {<core.autocrlf> <Id.Lit_Equals '='> ($ Id.VSub_DollarName '$crlf')} {<add>} {($ Id.VSub_DollarName '$fname')} ] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: { (DQ (${ Id.VSub_Name pfx) <_> ($ Id.VSub_DollarName '$f') <.err>) } ) ] do_fork: T ) ] ) ] ) ) (C {<git>} {<commit>} {<-m>} {(DQ <'core.autocrlf '> ($ Id.VSub_DollarName '$crlf'))}) (C {<check_warning>} {(DQ ($ Id.VSub_DollarName '$lfname'))} {(${ Id.VSub_Name pfx) <_LF.err>} ) (C {<check_warning>} {(DQ ($ Id.VSub_DollarName '$crlfname'))} {(${ Id.VSub_Name pfx) <_CRLF.err>} ) (C {<check_warning>} {(DQ ($ Id.VSub_DollarName '$lfmixcrlf'))} {(${ Id.VSub_Name pfx) <_CRLF_mix_LF.err>} ) (C {<check_warning>} {(DQ ($ Id.VSub_DollarName '$lfmixcr'))} {(${ Id.VSub_Name pfx) <_LF_mix_CR.err>} ) (C {<check_warning>} {(DQ ($ Id.VSub_DollarName '$crlfnul'))} {(${ Id.VSub_Name pfx) <_CRLF_nul.err>} ) ] ) ] ) ) (command.ShFunction name: commit_chk_wrnNNO body: (BraceGroup children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:attr) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [893] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:aeol) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [901] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:crlf) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [909] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lfwarn) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [917] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:crlfwarn) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [925] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lfmixcrlf) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [933] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lfmixcr) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [941] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:crlfnul) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [949] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pfx) op: assign_op.Equal rhs: {<NNO_attr_> (${ Id.VSub_Name attr) <_aeol_> (${ Id.VSub_Name aeol) <_> (${ Id.VSub_Name crlf) } spids: [957] ) ] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<create_gitattributes>} {(DQ ($ Id.VSub_DollarName '$attr'))} {($ Id.VSub_DollarName '$aeol')} ) (command.ForEach iter_name: f iter_words: [{<LF>} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<CRLF_nul>}] do_arg_iter: F body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:fname) op: assign_op.Equal rhs: {(${ Id.VSub_Name pfx) <_> ($ Id.VSub_DollarName '$f') <.txt>} spids: [1007] ) ] ) (C {<cp>} {($ Id.VSub_DollarName '$f')} {($ Id.VSub_DollarName '$fname')}) (command.Simple words: [{<printf>} {<Z>}] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_DollarName '$fname'))} ) ] do_fork: T ) (command.Simple words: [ {<git>} {<-c>} {<core.autocrlf> <Id.Lit_Equals '='> ($ Id.VSub_DollarName '$crlf')} {<add>} {($ Id.VSub_DollarName '$fname')} ] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: { (DQ (${ Id.VSub_Name pfx) <_> ($ Id.VSub_DollarName '$f') <.err>) } ) ] do_fork: T ) ] ) ] ) ) ] ) (C {<test_expect_success>} { (DQ <'commit NNO files crlf='> ($ Id.VSub_DollarName '$crlf') <' attr='> ($ Id.VSub_DollarName '$attr') <' LF'> ) } {(SQ <'\n'> <'\t\tcheck_warning "$lfwarn" ${pfx}_LF.err\n'> <'\t'>)} ) (C {<test_expect_success>} { (DQ <'commit NNO files attr='> ($ Id.VSub_DollarName '$attr') <' aeol='> ($ Id.VSub_DollarName '$aeol') <' crlf='> ($ Id.VSub_DollarName '$crlf') <' CRLF'> ) } {(SQ <'\n'> <'\t\tcheck_warning "$crlfwarn" ${pfx}_CRLF.err\n'> <'\t'>)} ) (C {<test_expect_success>} { (DQ <'commit NNO files attr='> ($ Id.VSub_DollarName '$attr') <' aeol='> ($ Id.VSub_DollarName '$aeol') <' crlf='> ($ Id.VSub_DollarName '$crlf') <' CRLF_mix_LF'> ) } {(SQ <'\n'> <'\t\tcheck_warning "$lfmixcrlf" ${pfx}_CRLF_mix_LF.err\n'> <'\t'>)} ) (C {<test_expect_success>} { (DQ <'commit NNO files attr='> ($ Id.VSub_DollarName '$attr') <' aeol='> ($ Id.VSub_DollarName '$aeol') <' crlf='> ($ Id.VSub_DollarName '$crlf') <' LF_mix_cr'> ) } {(SQ <'\n'> <'\t\tcheck_warning "$lfmixcr" ${pfx}_LF_mix_CR.err\n'> <'\t'>)} ) (C {<test_expect_success>} { (DQ <'commit NNO files attr='> ($ Id.VSub_DollarName '$attr') <' aeol='> ($ Id.VSub_DollarName '$aeol') <' crlf='> ($ Id.VSub_DollarName '$crlf') <' CRLF_nul'> ) } {(SQ <'\n'> <'\t\tcheck_warning "$crlfnul" ${pfx}_CRLF_nul.err\n'> <'\t'>)} ) ] ) ) (command.ShFunction name: stats_ascii body: (BraceGroup children: [ (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [{<LF>}] action: [(C {<echo>} {<lf>})] spids: [1181 1182 1190 -1] ) (case_arm pat_list: [{<CRLF>}] action: [(C {<echo>} {<crlf>})] spids: [1193 1194 1202 -1] ) (case_arm pat_list: [{<CRLF_mix_LF>}] action: [(C {<echo>} {<mixed>})] spids: [1205 1206 1214 -1] ) (case_arm pat_list: [{<LF_mix_CR>} {<CRLF_nul>} {<LF_nul>} {<CRLF_mix_CR>}] action: [(C {<echo>} {(DQ <-text>)})] spids: [1217 1224 1234 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [(C {<echo>} {<error_invalid>} {($ Id.VSub_Number '$1')})] spids: [1237 1238 1248 -1] ) ] ) ] ) ) (command.ShFunction name: attr_ascii body: (BraceGroup children: [ (command.Case to_match: {($ Id.VSub_Number '$1') <Id.Lit_Comma ','> ($ Id.VSub_Number '$2')} arms: [ (case_arm pat_list: [{<-text> <Id.Lit_Comma ','> <Id.Lit_Star '*'>}] action: [(C {<echo>} {(DQ <-text>)})] spids: [1284 1287 1295 -1] ) (case_arm pat_list: [{<text> <Id.Lit_Comma ','>}] action: [(C {<echo>} {(DQ <text>)})] spids: [1298 1300 1308 -1] ) (case_arm pat_list: [{<text> <Id.Lit_Comma ','> <lf>}] action: [(C {<echo>} {(DQ <'text eol=lf'>)})] spids: [1311 1314 1322 -1] ) (case_arm pat_list: [{<text> <Id.Lit_Comma ','> <crlf>}] action: [(C {<echo>} {(DQ <'text eol=crlf'>)})] spids: [1325 1328 1336 -1] ) (case_arm pat_list: [{<auto> <Id.Lit_Comma ','>}] action: [(C {<echo>} {(DQ <'text=auto'>)})] spids: [1339 1341 1349 -1] ) (case_arm pat_list: [{<auto> <Id.Lit_Comma ','> <lf>}] action: [(C {<echo>} {(DQ <'text=auto eol=lf'>)})] spids: [1352 1355 1363 -1] ) (case_arm pat_list: [{<auto> <Id.Lit_Comma ','> <crlf>}] action: [(C {<echo>} {(DQ <'text=auto eol=crlf'>)})] spids: [1366 1369 1377 -1] ) (case_arm pat_list: [{<lf> <Id.Lit_Comma ','>}] action: [(C {<echo>} {(DQ <'text eol=lf'>)})] spids: [1380 1382 1390 -1] ) (case_arm pat_list: [{<crlf> <Id.Lit_Comma ','>}] action: [(C {<echo>} {(DQ <'text eol=crlf'>)})] spids: [1393 1395 1403 -1] ) (case_arm pat_list: [{<Id.Lit_Comma ','>}] action: [(C {<echo>} {(DQ )})] spids: [1406 1407 1414 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (C {<echo>} {<invalid_attr>} {(DQ ($ Id.VSub_Number '$1') <','> ($ Id.VSub_Number '$2'))} ) ] spids: [1417 1418 1430 -1] ) ] ) ] ) ) (command.ShFunction name: check_files_in_repo body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:crlf) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1446] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:attr) op: assign_op.Equal rhs: {($ Id.VSub_Number '$2')} spids: [1450] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lfname) op: assign_op.Equal rhs: {($ Id.VSub_Number '$3')} spids: [1454] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:crlfname) op: assign_op.Equal rhs: {($ Id.VSub_Number '$4')} spids: [1458] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lfmixcrlf) op: assign_op.Equal rhs: {($ Id.VSub_Number '$5')} spids: [1462] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lfmixcr) op: assign_op.Equal rhs: {($ Id.VSub_Number '$6')} spids: [1466] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:crlfnul) op: assign_op.Equal rhs: {($ Id.VSub_Number '$7')} spids: [1470] ) ] ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pfx) op: assign_op.Equal rhs: {<crlf_> (${ Id.VSub_Name crlf) <_attr_> (${ Id.VSub_Name attr) <_>} spids: [1474] ) ] ) (C {<compare_files>} {($ Id.VSub_DollarName '$lfname')} {(${ Id.VSub_Name pfx) <LF.txt>}) (C {<compare_files>} {($ Id.VSub_DollarName '$crlfname')} {(${ Id.VSub_Name pfx) <CRLF.txt>} ) (C {<compare_files>} {($ Id.VSub_DollarName '$lfmixcrlf')} {(${ Id.VSub_Name pfx) <CRLF_mix_LF.txt>} ) (C {<compare_files>} {($ Id.VSub_DollarName '$lfmixcr')} {(${ Id.VSub_Name pfx) <LF_mix_CR.txt>} ) (C {<compare_files>} {($ Id.VSub_DollarName '$crlfnul')} {(${ Id.VSub_Name pfx) <CRLF_nul.txt>} ) ] ) ] ) ) (command.ShFunction name: check_in_repo_NNO body: (BraceGroup children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:attr) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1556] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:aeol) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1564] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:crlf) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1572] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lfname) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1580] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:crlfname) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1588] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lfmixcrlf) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1596] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lfmixcr) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1604] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:crlfnul) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1612] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pfx) op: assign_op.Equal rhs: {<NNO_attr_> (${ Id.VSub_Name attr) <_aeol_> (${ Id.VSub_Name aeol) <_> (${ Id.VSub_Name crlf) } spids: [1620] ) ] ) (C {<test_expect_success>} { (DQ <'compare_files '> ($ Id.VSub_DollarName '$lfname') <' '> (${ Id.VSub_Name pfx) <_LF.txt> ) } {(SQ <'\n'> <'\t\tcompare_files $lfname ${pfx}_LF.txt\n'> <'\t'>)} ) (C {<test_expect_success>} { (DQ <'compare_files '> ($ Id.VSub_DollarName '$crlfname') <' '> (${ Id.VSub_Name pfx) <_CRLF.txt> ) } {(SQ <'\n'> <'\t\tcompare_files $crlfname ${pfx}_CRLF.txt\n'> <'\t'>)} ) (C {<test_expect_success>} { (DQ <'compare_files '> ($ Id.VSub_DollarName '$lfmixcrlf') <' '> (${ Id.VSub_Name pfx) <_CRLF_mix_LF.txt> ) } {(SQ <'\n'> <'\t\tcompare_files $lfmixcrlf ${pfx}_CRLF_mix_LF.txt\n'> <'\t'>)} ) (C {<test_expect_success>} { (DQ <'compare_files '> ($ Id.VSub_DollarName '$lfmixcr') <' '> (${ Id.VSub_Name pfx) <_LF_mix_CR.txt> ) } {(SQ <'\n'> <'\t\tcompare_files $lfmixcr ${pfx}_LF_mix_CR.txt\n'> <'\t'>)} ) (C {<test_expect_success>} { (DQ <'compare_files '> ($ Id.VSub_DollarName '$crlfnul') <' '> (${ Id.VSub_Name pfx) <_CRLF_nul.txt> ) } {(SQ <'\n'> <'\t\tcompare_files $crlfnul ${pfx}_CRLF_nul.txt\n'> <'\t'>)} ) ] ) ) (command.ShFunction name: checkout_files body: (BraceGroup children: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:attr) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1740] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ident) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1748] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:aeol) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1755] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:crlf) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1763] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ceol) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1771] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lfname) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1779] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:crlfname) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1787] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lfmixcrlf) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1795] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lfmixcr) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1803] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:crlfnul) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [1811] ) ] ) terminator: <Id.Op_Semi _> ) (C {<shift>}) (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp] children: [ (C {<create_gitattributes>} {(DQ ($ Id.VSub_DollarName '$attr'))} {($ Id.VSub_DollarName '$ident')} {($ Id.VSub_DollarName '$aeol')} ) (C {<git>} {<config>} {<core.autocrlf>} {($ Id.VSub_DollarName '$crlf')}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pfx) op: assign_op.Equal rhs: {<eol_> (${ Id.VSub_Name ceol) <_crlf_> (${ Id.VSub_Name crlf) <_attr_> (${ Id.VSub_Name attr) <_> } spids: [1843] ) ] ) (command.ForEach iter_name: f iter_words: [{<LF>} {<CRLF>} {<LF_mix_CR>} {<CRLF_mix_LF>} {<LF_nul>}] do_arg_iter: F body: (command.DoGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<rm>} {<crlf_false_attr__> ($ Id.VSub_DollarName '$f') <.txt>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<test>} {<-z>} {(DQ ($ Id.VSub_DollarName '$ceol'))}) terminator: <Id.Op_Semi _> ) ] action: [ (C {<git>} {<checkout>} {<crlf_false_attr__> ($ Id.VSub_DollarName '$f') <.txt>} ) ] spids: [1890 1901] ) ] else_action: [ (C {<git>} {<-c>} {<core.eol> <Id.Lit_Equals '='> ($ Id.VSub_DollarName '$ceol')} {<checkout>} {<crlf_false_attr__> ($ Id.VSub_DollarName '$f') <.txt>} ) ] ) ] ) ] ) ) ] ) (C {<test_expect_success>} { (DQ <'ls-files --eol attr='> ($ Id.VSub_DollarName '$attr') <' '> ($ Id.VSub_DollarName '$ident') <' aeol='> ($ Id.VSub_DollarName '$aeol') <' core.autocrlf='> ($ Id.VSub_DollarName '$crlf') <' core.eol='> ($ Id.VSub_DollarName '$ceol') ) } { (SQ <'\n'> <'\t\ttest_when_finished "rm expect actual" &&\n'> <'\t\tsort <<-EOF >expect &&\n'> <'\t\ti/crlf w/$(stats_ascii $crlfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF.txt\n'> < '\t\ti/mixed w/$(stats_ascii $lfmixcrlf) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_mix_LF.txt\n' > <'\t\ti/lf w/$(stats_ascii $lfname) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF.txt\n'> < '\t\ti/-text w/$(stats_ascii $lfmixcr) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_mix_CR.txt\n' > < '\t\ti/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__CRLF_nul.txt\n' > < '\t\ti/-text w/$(stats_ascii $crlfnul) attr/$(attr_ascii $attr $aeol) crlf_false_attr__LF_nul.txt\n' > <'\t\tEOF\n'> <'\t\tgit ls-files --eol crlf_false_attr__* |\n'> <'\t\tsed -e "s/\t/ /g" -e "s/ */ /g" |\n'> <'\t\tsort >actual &&\n'> <'\t\ttest_cmp expect actual\n'> <'\t'> ) } ) (C {<test_expect_success>} { (DQ <'checkout attr='> ($ Id.VSub_DollarName '$attr') <' '> ($ Id.VSub_DollarName '$ident') <' aeol='> ($ Id.VSub_DollarName '$aeol') <' core.autocrlf='> ($ Id.VSub_DollarName '$crlf') <' core.eol='> ($ Id.VSub_DollarName '$ceol') <' file=LF'> ) } { (DQ <'\n'> <'\t\tcompare_ws_file '> ($ Id.VSub_DollarName '$pfx') <' '> ($ Id.VSub_DollarName '$lfname') <' crlf_false_attr__LF.txt\n'> <'\t'> ) } ) (C {<test_expect_success>} { (DQ <'checkout attr='> ($ Id.VSub_DollarName '$attr') <' '> ($ Id.VSub_DollarName '$ident') <' aeol='> ($ Id.VSub_DollarName '$aeol') <' core.autocrlf='> ($ Id.VSub_DollarName '$crlf') <' core.eol='> ($ Id.VSub_DollarName '$ceol') <' file=CRLF'> ) } { (DQ <'\n'> <'\t\tcompare_ws_file '> ($ Id.VSub_DollarName '$pfx') <' '> ($ Id.VSub_DollarName '$crlfname') <' crlf_false_attr__CRLF.txt\n'> <'\t'> ) } ) (C {<test_expect_success>} { (DQ <'checkout attr='> ($ Id.VSub_DollarName '$attr') <' '> ($ Id.VSub_DollarName '$ident') <' aeol='> ($ Id.VSub_DollarName '$aeol') <' core.autocrlf='> ($ Id.VSub_DollarName '$crlf') <' core.eol='> ($ Id.VSub_DollarName '$ceol') <' file=CRLF_mix_LF'> ) } { (DQ <'\n'> <'\t\tcompare_ws_file '> ($ Id.VSub_DollarName '$pfx') <' '> ($ Id.VSub_DollarName '$lfmixcrlf') <' crlf_false_attr__CRLF_mix_LF.txt\n'> <'\t'> ) } ) (C {<test_expect_success>} { (DQ <'checkout attr='> ($ Id.VSub_DollarName '$attr') <' '> ($ Id.VSub_DollarName '$ident') <' aeol='> ($ Id.VSub_DollarName '$aeol') <' core.autocrlf='> ($ Id.VSub_DollarName '$crlf') <' core.eol='> ($ Id.VSub_DollarName '$ceol') <' file=LF_mix_CR'> ) } { (DQ <'\n'> <'\t\tcompare_ws_file '> ($ Id.VSub_DollarName '$pfx') <' '> ($ Id.VSub_DollarName '$lfmixcr') <' crlf_false_attr__LF_mix_CR.txt\n'> <'\t'> ) } ) (C {<test_expect_success>} { (DQ <'checkout attr='> ($ Id.VSub_DollarName '$attr') <' '> ($ Id.VSub_DollarName '$ident') <' aeol='> ($ Id.VSub_DollarName '$aeol') <' core.autocrlf='> ($ Id.VSub_DollarName '$crlf') <' core.eol='> ($ Id.VSub_DollarName '$ceol') <' file=LF_nul'> ) } { (DQ <'\n'> <'\t\tcompare_ws_file '> ($ Id.VSub_DollarName '$pfx') <' '> ($ Id.VSub_DollarName '$crlfnul') <' crlf_false_attr__LF_nul.txt\n'> <'\t'> ) } ) ] ) ) (C {<test_expect_success>} {(SQ <'ls-files --eol -o Text/Binary'>)} { (SQ <'\n'> <'\ttest_when_finished "rm expect actual TeBi_*" &&\n'> <'\tSTRT=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA &&\n'> <'\tSTR=$STRT$STRT$STRT$STRT &&\n'> <'\tprintf "${STR}BBB\\001" >TeBi_127_S &&\n'> <'\tprintf "${STR}BBBB\\001">TeBi_128_S &&\n'> <'\tprintf "${STR}BBB\\032" >TeBi_127_E &&\n'> <'\tprintf "\\032${STR}BBB" >TeBi_E_127 &&\n'> <'\tprintf "${STR}BBBB\\000">TeBi_128_N &&\n'> <'\tprintf "${STR}BBB\\012">TeBi_128_L &&\n'> <'\tprintf "${STR}BBB\\015">TeBi_127_C &&\n'> <'\tprintf "${STR}BB\\015\\012" >TeBi_126_CL &&\n'> <'\tprintf "${STR}BB\\015\\012\\015" >TeBi_126_CLC &&\n'> <'\tsort <<-\\EOF >expect &&\n'> <'\ti/ w/-text TeBi_127_S\n'> <'\ti/ w/none TeBi_128_S\n'> <'\ti/ w/none TeBi_127_E\n'> <'\ti/ w/-text TeBi_E_127\n'> <'\ti/ w/-text TeBi_128_N\n'> <'\ti/ w/lf TeBi_128_L\n'> <'\ti/ w/-text TeBi_127_C\n'> <'\ti/ w/crlf TeBi_126_CL\n'> <'\ti/ w/-text TeBi_126_CLC\n'> <'\tEOF\n'> <'\tgit ls-files --eol -o |\n'> <'\tsed -n -e "/TeBi_/{s!attr/[\t]*!!g\n'> <'\ts!\t! !g\n'> <'\ts! *! !g\n'> <'\tp\n'> <'\t}" | sort >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'setup master'>)} { (SQ <'\n'> <'\techo >.gitattributes &&\n'> <'\tgit checkout -b master &&\n'> <'\tgit add .gitattributes &&\n'> <'\tgit commit -m "add .gitattributes" "" &&\n'> < '\tprintf "\\$Id: 0000000000000000000000000000000000000000 \\$\\nLINEONE\\nLINETWO\\nLINETHREE" >LF &&\n' > < '\tprintf "\\$Id: 0000000000000000000000000000000000000000 \\$\\r\\nLINEONE\\r\\nLINETWO\\r\\nLINETHREE" >CRLF &&\n' > < '\tprintf "\\$Id: 0000000000000000000000000000000000000000 \\$\\nLINEONE\\r\\nLINETWO\\nLINETHREE" >CRLF_mix_LF &&\n' > < '\tprintf "\\$Id: 0000000000000000000000000000000000000000 \\$\\nLINEONE\\nLINETWO\\rLINETHREE" >LF_mix_CR &&\n' > < '\tprintf "\\$Id: 0000000000000000000000000000000000000000 \\$\\r\\nLINEONE\\r\\nLINETWO\\rLINETHREE" >CRLF_mix_CR &&\n' > < '\tprintf "\\$Id: 0000000000000000000000000000000000000000 \\$\\r\\nLINEONEQ\\r\\nLINETWO\\r\\nLINETHREE" | q_to_nul >CRLF_nul &&\n' > < '\tprintf "\\$Id: 0000000000000000000000000000000000000000 \\$\\nLINEONEQ\\nLINETWO\\nLINETHREE" | q_to_nul >LF_nul &&\n' > <'\tcreate_NNO_files CRLF_mix_LF CRLF_mix_LF CRLF_mix_LF CRLF_mix_LF CRLF_mix_LF &&\n'> <'\tgit -c core.autocrlf=false add NNO_*.txt &&\n'> <'\tgit commit -m "mixed line endings" &&\n'> <'\ttest_tick\n'> ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:warn_LF_CRLF) op: assign_op.Equal rhs: {(DQ <'LF will be replaced by CRLF'>)} spids: [2184] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:warn_CRLF_LF) op: assign_op.Equal rhs: {(DQ <'CRLF will be replaced by LF'>)} spids: [2189] ) ] ) (command.If arms: [ (if_arm cond: [(C {<test_have_prereq>} {<NATIVE_CRLF>})] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WILC) op: assign_op.Equal rhs: {<LF_CRLF>} spids: [2213] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WICL) op: assign_op.Equal rhs: (word.Empty) spids: [2217] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WAMIX) op: assign_op.Equal rhs: {<LF_CRLF>} spids: [2220] ) ] ) ] spids: [2204 2210] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WILC) op: assign_op.Equal rhs: (word.Empty) spids: [2226] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WICL) op: assign_op.Equal rhs: {<CRLF_LF>} spids: [2229] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WAMIX) op: assign_op.Equal rhs: {<CRLF_LF>} spids: [2233] ) ] ) ] ) (C {<test_expect_success>} {(SQ <'commit files empty attr'>)} { (SQ <'\n'> <'\tcommit_check_warn false "" "" "" "" "" "" &&\n'> <'\tcommit_check_warn true "" "LF_CRLF" "" "LF_CRLF" "" "" &&\n'> <'\tcommit_check_warn input "" "" "CRLF_LF" "CRLF_LF" "" ""\n'> ) } ) (C {<test_expect_success>} {(SQ <'commit files attr=auto'>)} { (SQ <'\n'> <'\tcommit_check_warn false "auto" "$WILC" "$WICL" "$WAMIX" "" "" &&\n'> <'\tcommit_check_warn true "auto" "LF_CRLF" "" "LF_CRLF" "" "" &&\n'> <'\tcommit_check_warn input "auto" "" "CRLF_LF" "CRLF_LF" "" ""\n'> ) } ) (C {<test_expect_success>} {(SQ <'commit files attr=text'>)} { (SQ <'\n'> < '\tcommit_check_warn false "text" "$WILC" "$WICL" "$WAMIX" "$WILC" "$WICL" &&\n' > <'\tcommit_check_warn true "text" "LF_CRLF" "" "LF_CRLF" "LF_CRLF" "" &&\n'> <'\tcommit_check_warn input "text" "" "CRLF_LF" "CRLF_LF" "" "CRLF_LF"\n'> ) } ) (C {<test_expect_success>} {(SQ <'commit files attr=-text'>)} { (SQ <'\n'> <'\tcommit_check_warn false "-text" "" "" "" "" "" &&\n'> <'\tcommit_check_warn true "-text" "" "" "" "" "" &&\n'> <'\tcommit_check_warn input "-text" "" "" "" "" ""\n'> ) } ) (C {<test_expect_success>} {(SQ <'commit files attr=lf'>)} { (SQ <'\n'> < '\tcommit_check_warn false "lf" "" "CRLF_LF" "CRLF_LF" "" "CRLF_LF" &&\n' > <'\tcommit_check_warn true "lf" "" "CRLF_LF" "CRLF_LF" "" "CRLF_LF" &&\n'> <'\tcommit_check_warn input "lf" "" "CRLF_LF" "CRLF_LF" "" "CRLF_LF"\n'> ) } ) (C {<test_expect_success>} {(SQ <'commit files attr=crlf'>)} { (SQ <'\n'> <'\tcommit_check_warn false "crlf" "LF_CRLF" "" "LF_CRLF" "LF_CRLF" "" &&\n'> <'\tcommit_check_warn true "crlf" "LF_CRLF" "" "LF_CRLF" "LF_CRLF" "" &&\n'> <'\tcommit_check_warn input "crlf" "LF_CRLF" "" "LF_CRLF" "LF_CRLF" ""\n'> ) } ) (C {<commit_chk_wrnNNO>} {(DQ )} {(DQ )} {<false>} {(DQ )} {(DQ )} {(DQ )} {(DQ )} {(DQ )}) (C {<commit_chk_wrnNNO>} {(DQ )} {(DQ )} {<true>} {<LF_CRLF>} {(DQ )} {(DQ )} {(DQ )} {(DQ )}) (C {<commit_chk_wrnNNO>} {(DQ )} {(DQ )} {<input>} {(DQ )} {(DQ )} {(DQ )} {(DQ )} {(DQ )}) (C {<commit_chk_wrnNNO>} {(DQ <auto>)} {(DQ )} {<false>} {(DQ ($ Id.VSub_DollarName '$WILC'))} {(DQ )} {(DQ )} {(DQ )} {(DQ )}) (C {<commit_chk_wrnNNO>} {(DQ <auto>)} {(DQ )} {<true>} {<LF_CRLF>} {(DQ )} {(DQ )} {(DQ )} {(DQ )}) (C {<commit_chk_wrnNNO>} {(DQ <auto>)} {(DQ )} {<input>} {(DQ )} {(DQ )} {(DQ )} {(DQ )} {(DQ )}) (command.ForEach iter_name: crlf iter_words: [{<true>} {<false>} {<input>}] do_arg_iter: F body: (command.DoGroup children: [ (C {<commit_chk_wrnNNO>} {<-text>} {(DQ )} {($ Id.VSub_DollarName '$crlf')} {(DQ )} {(DQ )} {(DQ )} {(DQ )} {(DQ )}) (C {<commit_chk_wrnNNO>} {<-text>} {<lf>} {($ Id.VSub_DollarName '$crlf')} {(DQ )} {(DQ )} {(DQ )} {(DQ )} {(DQ )}) (C {<commit_chk_wrnNNO>} {<-text>} {<crlf>} {($ Id.VSub_DollarName '$crlf')} {(DQ )} {(DQ )} {(DQ )} {(DQ )} {(DQ )}) (C {<commit_chk_wrnNNO>} {(DQ )} {<lf>} {($ Id.VSub_DollarName '$crlf')} {(DQ )} {<CRLF_LF>} {<CRLF_LF>} {(DQ )} {<CRLF_LF>} ) (C {<commit_chk_wrnNNO>} {(DQ )} {<crlf>} {($ Id.VSub_DollarName '$crlf')} {<LF_CRLF>} {(DQ )} {<LF_CRLF>} {<LF_CRLF>} {(DQ )} ) (C {<commit_chk_wrnNNO>} {<auto>} {<lf>} {($ Id.VSub_DollarName '$crlf')} {(DQ )} {(DQ )} {(DQ )} {(DQ )} {(DQ )}) (C {<commit_chk_wrnNNO>} {<auto>} {<crlf>} {($ Id.VSub_DollarName '$crlf')} {<LF_CRLF>} {(DQ )} {(DQ )} {(DQ )} {(DQ )}) (C {<commit_chk_wrnNNO>} {<text>} {<lf>} {($ Id.VSub_DollarName '$crlf')} {(DQ )} {<CRLF_LF>} {<CRLF_LF>} {(DQ )} {<CRLF_LF>} ) (C {<commit_chk_wrnNNO>} {<text>} {<crlf>} {($ Id.VSub_DollarName '$crlf')} {<LF_CRLF>} {(DQ )} {<LF_CRLF>} {<LF_CRLF>} {(DQ )} ) ] ) ) (C {<commit_chk_wrnNNO>} {(DQ <text>)} {(DQ )} {<false>} {(DQ ($ Id.VSub_DollarName '$WILC'))} {(DQ ($ Id.VSub_DollarName '$WICL'))} {(DQ ($ Id.VSub_DollarName '$WAMIX'))} {(DQ ($ Id.VSub_DollarName '$WILC'))} {(DQ ($ Id.VSub_DollarName '$WICL'))} ) (C {<commit_chk_wrnNNO>} {(DQ <text>)} {(DQ )} {<true>} {<LF_CRLF>} {(DQ )} {<LF_CRLF>} {<LF_CRLF>} {(DQ )}) (C {<commit_chk_wrnNNO>} {(DQ <text>)} {(DQ )} {<input>} {(DQ )} {<CRLF_LF>} {<CRLF_LF>} {(DQ )} {<CRLF_LF>} ) (C {<test_expect_success>} {(SQ <'commit NNO and cleanup'>)} { (SQ <'\n'> <'\tgit commit -m "commit files on top of NNO" &&\n'> <'\trm -f *.txt &&\n'> <'\tgit -c core.autocrlf=false reset --hard\n'> ) } ) (C {<test_expect_success>} {(SQ <'commit empty gitattribues'>)} { (SQ <'\n'> <'\tcheck_files_in_repo false "" LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul &&\n'> <'\tcheck_files_in_repo true "" LF LF LF LF_mix_CR CRLF_nul &&\n'> <'\tcheck_files_in_repo input "" LF LF LF LF_mix_CR CRLF_nul\n'> ) } ) (C {<test_expect_success>} {(SQ <'commit text=auto'>)} { (SQ <'\n'> <'\tcheck_files_in_repo false "auto" LF LF LF LF_mix_CR CRLF_nul &&\n'> <'\tcheck_files_in_repo true "auto" LF LF LF LF_mix_CR CRLF_nul &&\n'> <'\tcheck_files_in_repo input "auto" LF LF LF LF_mix_CR CRLF_nul\n'> ) } ) (C {<test_expect_success>} {(SQ <'commit text'>)} { (SQ <'\n'> <'\tcheck_files_in_repo false "text" LF LF LF LF_mix_CR LF_nul &&\n'> <'\tcheck_files_in_repo true "text" LF LF LF LF_mix_CR LF_nul &&\n'> <'\tcheck_files_in_repo input "text" LF LF LF LF_mix_CR LF_nul\n'> ) } ) (C {<test_expect_success>} {(SQ <'commit -text'>)} { (SQ <'\n'> <'\tcheck_files_in_repo false "-text" LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul &&\n'> <'\tcheck_files_in_repo true "-text" LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul &&\n'> <'\tcheck_files_in_repo input "-text" LF CRLF CRLF_mix_LF LF_mix_CR CRLF_nul\n'> ) } ) (command.ForEach iter_name: crlf iter_words: [{<true>} {<false>} {<input>}] do_arg_iter: F body: (command.DoGroup children: [ (C {<check_in_repo_NNO>} {(DQ )} {(DQ )} {($ Id.VSub_DollarName '$crlf')} {<LF>} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<CRLF_nul>} ) (C {<check_in_repo_NNO>} {<-text>} {(DQ )} {($ Id.VSub_DollarName '$crlf')} {<LF>} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<CRLF_nul>} ) (C {<check_in_repo_NNO>} {<-text>} {<lf>} {($ Id.VSub_DollarName '$crlf')} {<LF>} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<CRLF_nul>} ) (C {<check_in_repo_NNO>} {<-text>} {<crlf>} {($ Id.VSub_DollarName '$crlf')} {<LF>} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<CRLF_nul>} ) (C {<check_in_repo_NNO>} {<auto>} {(DQ )} {($ Id.VSub_DollarName '$crlf')} {<LF>} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<CRLF_nul>} ) (C {<check_in_repo_NNO>} {<auto>} {<lf>} {($ Id.VSub_DollarName '$crlf')} {<LF>} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<CRLF_nul>} ) (C {<check_in_repo_NNO>} {<auto>} {<crlf>} {($ Id.VSub_DollarName '$crlf')} {<LF>} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<CRLF_nul>} ) (C {<check_in_repo_NNO>} {<text>} {(DQ )} {($ Id.VSub_DollarName '$crlf')} {<LF>} {<LF>} {<LF>} {<LF_mix_CR>} {<LF_nul>} ) (C {<check_in_repo_NNO>} {<text>} {<lf>} {($ Id.VSub_DollarName '$crlf')} {<LF>} {<LF>} {<LF>} {<LF_mix_CR>} {<LF_nul>} ) (C {<check_in_repo_NNO>} {<text>} {<crlf>} {($ Id.VSub_DollarName '$crlf')} {<LF>} {<LF>} {<LF>} {<LF_mix_CR>} {<LF_nul>} ) ] ) ) (command.If arms: [ (if_arm cond: [(C {<test_have_prereq>} {<NATIVE_CRLF>})] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MIX_CRLF_LF) op: assign_op.Equal rhs: {<CRLF>} spids: [3125] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MIX_LF_CR) op: assign_op.Equal rhs: {<CRLF_mix_CR>} spids: [3128] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NL) op: assign_op.Equal rhs: {<CRLF>} spids: [3131] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LFNUL) op: assign_op.Equal rhs: {<CRLF_nul>} spids: [3134] ) ] ) ] spids: [3117 3123] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MIX_CRLF_LF) op: assign_op.Equal rhs: {<CRLF_mix_LF>} spids: [3139] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MIX_LF_CR) op: assign_op.Equal rhs: {<LF_mix_CR>} spids: [3142] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NL) op: assign_op.Equal rhs: {<LF>} spids: [3145] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LFNUL) op: assign_op.Equal rhs: {<LF_nul>} spids: [3148] ) ] ) ] ) (C {<export>} {<CRLF_MIX_LF_CR>} {<MIX>} {<NL>}) (command.ForEach iter_name: id iter_words: [{(DQ )} {<ident>}] do_arg_iter: F body: (command.DoGroup children: [ (command.ForEach iter_name: ceol iter_words: [{<lf>} {<crlf>} {<native>}] do_arg_iter: F body: (command.DoGroup children: [ (command.ForEach iter_name: crlf iter_words: [{<true>} {<false>} {<input>}] do_arg_iter: F body: (command.DoGroup children: [ (C {<checkout_files>} {<-text>} {(DQ ($ Id.VSub_DollarName '$id'))} {(DQ )} {(DQ ($ Id.VSub_DollarName '$crlf'))} {(DQ ($ Id.VSub_DollarName '$ceol'))} {<LF>} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<LF_nul>} ) (C {<checkout_files>} {<-text>} {(DQ ($ Id.VSub_DollarName '$id'))} {(DQ <lf>)} {(DQ ($ Id.VSub_DollarName '$crlf'))} {(DQ ($ Id.VSub_DollarName '$ceol'))} {<LF>} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<LF_nul>} ) (C {<checkout_files>} {<-text>} {(DQ ($ Id.VSub_DollarName '$id'))} {(DQ <crlf>)} {(DQ ($ Id.VSub_DollarName '$crlf'))} {(DQ ($ Id.VSub_DollarName '$ceol'))} {<LF>} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<LF_nul>} ) (C {<checkout_files>} {<text>} {(DQ ($ Id.VSub_DollarName '$id'))} {(DQ <lf>)} {(DQ ($ Id.VSub_DollarName '$crlf'))} {(DQ ($ Id.VSub_DollarName '$ceol'))} {<LF>} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<LF_nul>} ) (C {<checkout_files>} {<text>} {(DQ ($ Id.VSub_DollarName '$id'))} {(DQ <crlf>)} {(DQ ($ Id.VSub_DollarName '$crlf'))} {(DQ ($ Id.VSub_DollarName '$ceol'))} {<CRLF>} {<CRLF>} {<CRLF>} {<CRLF_mix_CR>} {<CRLF_nul>} ) (C {<checkout_files>} {<auto>} {(DQ ($ Id.VSub_DollarName '$id'))} {(DQ <lf>)} {(DQ ($ Id.VSub_DollarName '$crlf'))} {(DQ ($ Id.VSub_DollarName '$ceol'))} {<LF>} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<LF_nul>} ) (C {<checkout_files>} {<auto>} {(DQ ($ Id.VSub_DollarName '$id'))} {(DQ <crlf>)} {(DQ ($ Id.VSub_DollarName '$crlf'))} {(DQ ($ Id.VSub_DollarName '$ceol'))} {<CRLF>} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<LF_nul>} ) ] ) ) (C {<checkout_files>} {(DQ )} {(DQ ($ Id.VSub_DollarName '$id'))} {(DQ )} {<false>} {(DQ ($ Id.VSub_DollarName '$ceol'))} {<LF>} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<LF_nul>} ) (C {<checkout_files>} {(DQ )} {(DQ ($ Id.VSub_DollarName '$id'))} {(DQ )} {<true>} {(DQ ($ Id.VSub_DollarName '$ceol'))} {<CRLF>} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<LF_nul>} ) (C {<checkout_files>} {<auto>} {(DQ ($ Id.VSub_DollarName '$id'))} {(DQ )} {<true>} {(DQ ($ Id.VSub_DollarName '$ceol'))} {<CRLF>} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<LF_nul>} ) (C {<checkout_files>} {<text>} {(DQ ($ Id.VSub_DollarName '$id'))} {(DQ )} {<true>} {(DQ ($ Id.VSub_DollarName '$ceol'))} {<CRLF>} {<CRLF>} {<CRLF>} {<CRLF_mix_CR>} {<CRLF_nul>} ) (C {<checkout_files>} {<text>} {(DQ ($ Id.VSub_DollarName '$id'))} {(DQ )} {<input>} {(DQ ($ Id.VSub_DollarName '$ceol'))} {<LF>} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<LF_nul>} ) (C {<checkout_files>} {<auto>} {(DQ ($ Id.VSub_DollarName '$id'))} {(DQ )} {<input>} {(DQ ($ Id.VSub_DollarName '$ceol'))} {<LF>} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<LF_nul>} ) ] ) ) (C {<checkout_files>} {<text>} {(DQ ($ Id.VSub_DollarName '$id'))} {(DQ )} {<false>} {<crlf>} {<CRLF>} {<CRLF>} {<CRLF>} {<CRLF_mix_CR>} {<CRLF_nul>} ) (C {<checkout_files>} {<text>} {(DQ ($ Id.VSub_DollarName '$id'))} {(DQ )} {<false>} {<lf>} {<LF>} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<LF_nul>} ) (C {<checkout_files>} {<text>} {(DQ ($ Id.VSub_DollarName '$id'))} {(DQ )} {<false>} {(DQ )} {($ Id.VSub_DollarName '$NL')} {<CRLF>} {($ Id.VSub_DollarName '$MIX_CRLF_LF')} {($ Id.VSub_DollarName '$MIX_LF_CR')} {($ Id.VSub_DollarName '$LFNUL')} ) (C {<checkout_files>} {<text>} {(DQ ($ Id.VSub_DollarName '$id'))} {(DQ )} {<false>} {<native>} {($ Id.VSub_DollarName '$NL')} {<CRLF>} {($ Id.VSub_DollarName '$MIX_CRLF_LF')} {($ Id.VSub_DollarName '$MIX_LF_CR')} {($ Id.VSub_DollarName '$LFNUL')} ) (C {<checkout_files>} {<auto>} {(DQ ($ Id.VSub_DollarName '$id'))} {(DQ )} {<false>} {(DQ )} {($ Id.VSub_DollarName '$NL')} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<LF_nul>} ) (C {<checkout_files>} {<auto>} {(DQ ($ Id.VSub_DollarName '$id'))} {(DQ )} {<false>} {<native>} {($ Id.VSub_DollarName '$NL')} {<CRLF>} {<CRLF_mix_LF>} {<LF_mix_CR>} {<LF_nul>} ) ] ) ) (C {<test_expect_success>} {(SQ <'ls-files --eol -d -z'>)} { (SQ <'\n'> < '\trm crlf_false_attr__CRLF.txt crlf_false_attr__CRLF_mix_LF.txt crlf_false_attr__LF.txt .gitattributes &&\n' > <'\tcat >expect <<-\\EOF &&\n'> <'\ti/crlf w/ crlf_false_attr__CRLF.txt\n'> <'\ti/lf w/ .gitattributes\n'> <'\ti/lf w/ crlf_false_attr__LF.txt\n'> <'\ti/mixed w/ crlf_false_attr__CRLF_mix_LF.txt\n'> <'\tEOF\n'> <'\tgit ls-files --eol -d |\n'> <'\tsed -e "s!attr/[^\t]*!!g" -e "s/\t/ /g" -e "s/ */ /g" |\n'> <'\tsort >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_done>}) ] )