(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"test fetching of oddly-named refs">)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(SQ <"setup repo with odd suffix ref">)} { (SQ <"\n"> <"\techo content >file &&\n"> <"\tgit add . &&\n"> <"\tgit commit -m one &&\n"> <"\tgit update-ref refs/for/refs/heads/master HEAD &&\n"> <"\techo content >>file &&\n"> <"\tgit commit -a -m two &&\n"> <"\techo content >>file &&\n"> <"\tgit commit -a -m three &&\n"> <"\tgit checkout HEAD^\n"> ) } ) (C {(test_expect_success)} {(SQ <"suffix ref is ignored during fetch">)} { (SQ <"\n"> <"\tgit clone --bare file://\"$PWD\" suffix &&\n"> <"\techo three >expect &&\n"> <"\tgit --git-dir=suffix log -1 --format=%s refs/heads/master >actual &&\n"> <"\ttest_cmp expect actual\n"> ) } ) (C {(test_expect_success)} {(SQ <"try to create repo with absurdly long refname">)} { (SQ <"\n"> <"\tref240=$_z40/$_z40/$_z40/$_z40/$_z40/$_z40 &&\n"> <"\tref1440=$ref240/$ref240/$ref240/$ref240/$ref240/$ref240 &&\n"> <"\tgit init long &&\n"> <"\t(\n"> <"\t\tcd long &&\n"> <"\t\ttest_commit long &&\n"> <"\t\ttest_commit master\n"> <"\t) &&\n"> <"\tif git -C long update-ref refs/heads/$ref1440 long; then\n"> <"\t\ttest_set_prereq LONG_REF\n"> <"\telse\n"> <"\t\techo >&2 \"long refs not supported\"\n"> <"\tfi\n"> ) } ) (C {(test_expect_success)} {(LONG_REF)} {(SQ <"fetch handles extremely long refname">)} { (SQ <"\n"> <"\tgit fetch long refs/heads/*:refs/remotes/long/* &&\n"> <"\tcat >expect <<-\\EOF &&\n"> <"\tlong\n"> <"\tmaster\n"> <"\tEOF\n"> <"\tgit for-each-ref --format=\"%(subject)\" refs/remotes/long >actual &&\n"> <"\ttest_cmp expect actual\n"> ) } ) (C {(test_expect_success)} {(LONG_REF)} {(SQ <"push handles extremely long refname">)} { (SQ <"\n"> <"\tgit push long :refs/heads/$ref1440 &&\n"> <"\tgit -C long for-each-ref --format=\"%(subject)\" refs/heads >actual &&\n"> <"\techo master >expect &&\n"> <"\ttest_cmp expect actual\n"> ) } ) (C {(test_done)}) ] )