(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: { (SQ (Token id: Id.Lit_Chars val: 'test smart pushing over http via http-backend' span_id: 15 ) ) } spids: [13] ) ] ) (C {(.)} {(./test-lib.sh)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ROOT_PATH) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$PWD'))} spids: [23] ) ] ) (C {(.)} {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY')) (/lib-gpg.sh)}) (C {(.)} {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY')) (/lib-httpd.sh)}) (C {(.)} {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY')) (/lib-terminal.sh)}) (C {(start_httpd)}) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'setup remote repository' span_id:55))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:59) (Token id:Id.Lit_Chars val:'\tcd "$ROOT_PATH" &&\n' span_id:60) (Token id:Id.Lit_Chars val:'\tmkdir test_repo &&\n' span_id:61) (Token id:Id.Lit_Chars val:'\tcd test_repo &&\n' span_id:62) (Token id:Id.Lit_Chars val:'\tgit init &&\n' span_id:63) (Token id:Id.Lit_Chars val:'\t: >path1 &&\n' span_id:64) (Token id:Id.Lit_Chars val:'\tgit add path1 &&\n' span_id:65) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:66) (Token id:Id.Lit_Chars val:'\tgit commit -m initial &&\n' span_id:67) (Token id:Id.Lit_Chars val:'\tcd - &&\n' span_id:68) (Token id:Id.Lit_Chars val:'\tgit clone --bare test_repo test_repo.git &&\n' span_id:69) (Token id:Id.Lit_Chars val:'\tcd test_repo.git &&\n' span_id:70) (Token id:Id.Lit_Chars val:'\tgit config http.receivepack true &&\n' span_id:71) (Token id: Id.Lit_Chars val: '\tgit config core.logallrefupdates true &&\n' span_id: 72 ) (Token id:Id.Lit_Chars val:'\tORIG_HEAD=$(git rev-parse --verify HEAD) &&\n' span_id:73) (Token id:Id.Lit_Chars val:'\tcd - &&\n' span_id:74) (Token id:Id.Lit_Chars val:'\tmv test_repo.git "$HTTPD_DOCUMENT_ROOT_PATH"\n' span_id:75) ) } ) (C {(setup_askpass_helper)}) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op:(Token id:Id.Redir_Great val:'>' span_id:84) fd:-1 arg_word:{(exp)}) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:87) fd: -1 here_begin: {(EOF)} here_end_span_id: 93 stdin_parts: [ ('GET /smart/test_repo.git/info/refs?service=git-upload-pack HTTP/1.1 200\n') ('POST /smart/test_repo.git/git-upload-pack HTTP/1.1 200\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'no empty path components' span_id:97))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:101) (Token id: Id.Lit_Chars val: '\t# In the URL, add a trailing slash, and see if git appends yet another\n' span_id: 102 ) (Token id:Id.Lit_Chars val:'\t# slash.\n' span_id:103) (Token id:Id.Lit_Chars val:'\tcd "$ROOT_PATH" &&\n' span_id:104) (Token id: Id.Lit_Chars val: '\tgit clone $HTTPD_URL/smart/test_repo.git/ test_repo_clone &&\n' span_id: 105 ) (Token id:Id.Lit_Chars val:'\n' span_id:106) (Token id:Id.Lit_Chars val:'\tsed -e "\n' span_id:107) (Token id:Id.Lit_Chars val:'\t\ts/^.* \\"//\n' span_id:108) (Token id:Id.Lit_Chars val:'\t\ts/\\"//\n' span_id:109) (Token id:Id.Lit_Chars val:'\t\ts/ [1-9][0-9]*\\$//\n' span_id:110) (Token id:Id.Lit_Chars val:'\t\ts/^GET /GET /\n' span_id:111) (Token id: Id.Lit_Chars val: '\t" >act <"$HTTPD_ROOT_PATH"/access.log &&\n' span_id: 112 ) (Token id:Id.Lit_Chars val:'\n' span_id:113) (Token id: Id.Lit_Chars val: '\t# Clear the log, so that it does not affect the "used receive-pack\n' span_id: 114 ) (Token id:Id.Lit_Chars val:'\t# service" test which reads the log too.\n' span_id:115) (Token id:Id.Lit_Chars val:'\t#\n' span_id:116) (Token id: Id.Lit_Chars val: '\t# We do this before the actual comparison to ensure the log is cleared.\n' span_id: 117 ) (Token id:Id.Lit_Chars val:'\techo > "$HTTPD_ROOT_PATH"/access.log &&\n' span_id:118) (Token id:Id.Lit_Chars val:'\n' span_id:119) (Token id:Id.Lit_Chars val:'\ttest_cmp exp act\n' span_id:120) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'clone remote repository' span_id:127))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:131) (Token id:Id.Lit_Chars val:'\trm -rf test_repo_clone &&\n' span_id:132) (Token id: Id.Lit_Chars val: '\tgit clone $HTTPD_URL/smart/test_repo.git test_repo_clone &&\n' span_id: 133 ) (Token id:Id.Lit_Chars val:'\t(\n' span_id:134) (Token id: Id.Lit_Chars val: '\t\tcd test_repo_clone && git config push.default matching\n' span_id: 135 ) (Token id:Id.Lit_Chars val:'\t)\n' span_id:136) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'push to remote repository (standard)' span_id:143))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:147) (Token id:Id.Lit_Chars val:'\tcd "$ROOT_PATH"/test_repo_clone &&\n' span_id:148) (Token id:Id.Lit_Chars val:'\t: >path2 &&\n' span_id:149) (Token id:Id.Lit_Chars val:'\tgit add path2 &&\n' span_id:150) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:151) (Token id:Id.Lit_Chars val:'\tgit commit -m path2 &&\n' span_id:152) (Token id:Id.Lit_Chars val:'\tHEAD=$(git rev-parse --verify HEAD) &&\n' span_id:153) (Token id: Id.Lit_Chars val: '\tGIT_TRACE_CURL=true git push -v -v 2>err &&\n' span_id: 154 ) (Token id:Id.Lit_Chars val:'\t! grep "Expect: 100-continue" err &&\n' span_id:155) (Token id: Id.Lit_Chars val: '\tgrep "POST git-receive-pack ([0-9]* bytes)" err &&\n' span_id: 156 ) (Token id:Id.Lit_Chars val:'\t(cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&\n' span_id:157) (Token id: Id.Lit_Chars val: '\t test $HEAD = $(git rev-parse --verify HEAD))\n' span_id: 158 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'push already up-to-date' span_id:165))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:169) (Token id:Id.Lit_Chars val:'\tgit push\n' span_id:170) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'create and delete remote branch' span_id:177))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:181) (Token id:Id.Lit_Chars val:'\tcd "$ROOT_PATH"/test_repo_clone &&\n' span_id:182) (Token id:Id.Lit_Chars val:'\tgit checkout -b dev &&\n' span_id:183) (Token id:Id.Lit_Chars val:'\t: >path3 &&\n' span_id:184) (Token id:Id.Lit_Chars val:'\tgit add path3 &&\n' span_id:185) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:186) (Token id:Id.Lit_Chars val:'\tgit commit -m dev &&\n' span_id:187) (Token id:Id.Lit_Chars val:'\tgit push origin dev &&\n' span_id:188) (Token id:Id.Lit_Chars val:'\tgit push origin :dev &&\n' span_id:189) (Token id: Id.Lit_Chars val: '\ttest_must_fail git show-ref --verify refs/remotes/origin/dev\n' span_id: 190 ) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:196) fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$HTTPD_DOCUMENT_ROOT_PATH') (/test_repo.git/hooks/update))} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:202) fd: -1 here_begin: {(EOF)} here_end_span_id: 208 stdin_parts: [('#!/bin/sh\n') ('exit 1\n')] ) ] ) (C {(chmod)} {(a) (Id.Lit_Other '+') (x)} {(DQ ($ Id.VSub_DollarName '$HTTPD_DOCUMENT_ROOT_PATH') (/test_repo.git/hooks/update))} ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op:(Token id:Id.Redir_Great val:'>' span_id:223) fd:-1 arg_word:{(exp)}) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:226) fd: -1 here_begin: {(EOF)} here_end_span_id: 238 stdin_parts: [ ('remote: error: hook declined to update refs/heads/dev2\n') ('To http://127.0.0.1:') ($ Id.VSub_DollarName '$LIB_HTTPD_PORT') ('/smart/test_repo.git\n') (' ! [remote rejected] dev2 -> dev2 (hook declined)\n') ("error: failed to push some refs to 'http://127.0.0.1:") ($ Id.VSub_DollarName '$LIB_HTTPD_PORT') ("/smart/test_repo.git'\n") ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'rejected update prints status' span_id:243))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:247) (Token id:Id.Lit_Chars val:'\tcd "$ROOT_PATH"/test_repo_clone &&\n' span_id:248) (Token id:Id.Lit_Chars val:'\tgit checkout -b dev2 &&\n' span_id:249) (Token id:Id.Lit_Chars val:'\t: >path4 &&\n' span_id:250) (Token id:Id.Lit_Chars val:'\tgit add path4 &&\n' span_id:251) (Token id:Id.Lit_Chars val:'\ttest_tick &&\n' span_id:252) (Token id:Id.Lit_Chars val:'\tgit commit -m dev2 &&\n' span_id:253) (Token id: Id.Lit_Chars val: '\ttest_must_fail git push origin dev2 2>act &&\n' span_id: 254 ) (Token id:Id.Lit_Chars val:'\tsed -e "/^remote: /s/ *$//" <act >cmp &&\n' span_id:255) (Token id:Id.Lit_Chars val:'\ttest_i18ncmp exp cmp\n' span_id:256) ) } ) (C {(rm)} {(-f)} {(DQ ($ Id.VSub_DollarName '$HTTPD_DOCUMENT_ROOT_PATH') (/test_repo.git/hooks/update))} ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op:(Token id:Id.Redir_Great val:'>' span_id:271) fd:-1 arg_word:{(exp)}) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:274) fd: -1 here_begin: {(EOF)} here_end_span_id: 290 stdin_parts: [ ('\n') ('GET /smart/test_repo.git/info/refs?service=git-upload-pack HTTP/1.1 200\n') ('POST /smart/test_repo.git/git-upload-pack HTTP/1.1 200\n') ('GET /smart/test_repo.git/info/refs?service=git-receive-pack HTTP/1.1 200\n') ('POST /smart/test_repo.git/git-receive-pack HTTP/1.1 200\n') ('GET /smart/test_repo.git/info/refs?service=git-receive-pack HTTP/1.1 200\n') ('GET /smart/test_repo.git/info/refs?service=git-receive-pack HTTP/1.1 200\n') ('POST /smart/test_repo.git/git-receive-pack HTTP/1.1 200\n') ('GET /smart/test_repo.git/info/refs?service=git-receive-pack HTTP/1.1 200\n') ('POST /smart/test_repo.git/git-receive-pack HTTP/1.1 200\n') ('GET /smart/test_repo.git/info/refs?service=git-receive-pack HTTP/1.1 200\n') ('POST /smart/test_repo.git/git-receive-pack HTTP/1.1 200\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'used receive-pack service' span_id:294))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:298) (Token id:Id.Lit_Chars val:'\tsed -e "\n' span_id:299) (Token id:Id.Lit_Chars val:'\t\ts/^.* \\"//\n' span_id:300) (Token id:Id.Lit_Chars val:'\t\ts/\\"//\n' span_id:301) (Token id:Id.Lit_Chars val:'\t\ts/ [1-9][0-9]*\\$//\n' span_id:302) (Token id:Id.Lit_Chars val:'\t\ts/^GET /GET /\n' span_id:303) (Token id:Id.Lit_Chars val:'\t" >act <"$HTTPD_ROOT_PATH"/access.log &&\n' span_id:304) (Token id:Id.Lit_Chars val:'\ttest_cmp exp act\n' span_id:305) ) } ) (C {(test_http_push_nonff)} {(DQ ($ Id.VSub_DollarName '$HTTPD_DOCUMENT_ROOT_PATH')) (/test_repo.git)} {(DQ ($ Id.VSub_DollarName '$ROOT_PATH')) (/test_repo_clone)} {(master)} {(success)} ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'push fails for non-fast-forward refs unmatched by remote helper' span_id: 331 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:335) (Token id: Id.Lit_Chars val: '\t# create a dissimilarly-named remote ref so that git is unable to match the\n' span_id: 336 ) (Token id: Id.Lit_Chars val: '\t# two refs (viz. local, remote) unless an explicit refspec is provided.\n' span_id: 337 ) (Token id:Id.Lit_Chars val:'\tgit push origin master:retsam &&\n' span_id:338) (Token id:Id.Lit_Chars val:'\n' span_id:339) (Token id:Id.Lit_Chars val:'\techo "change changed" > path2 &&\n' span_id:340) (Token id:Id.Lit_Chars val:'\tgit commit -a -m path2 --amend &&\n' span_id:341) (Token id:Id.Lit_Chars val:'\n' span_id:342) (Token id: Id.Lit_Chars val: '\t# push master too; this ensures there is at least one ' span_id: 343 ) ) (DQ ("'push'")) (SQ (Token id:Id.Lit_Chars val:' command to\n' span_id:349) (Token id: Id.Lit_Chars val: '\t# the remote helper and triggers interaction with the helper.\n' span_id: 350 ) (Token id: Id.Lit_Chars val: '\ttest_must_fail git push -v origin +master master:retsam >output 2>&1' span_id: 351 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'push fails for non-fast-forward refs unmatched by remote helper: remote output' span_id: 358 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:362) (Token id: Id.Lit_Chars val: '\tgrep "^ + [a-f0-9]*\\.\\.\\.[a-f0-9]* *master -> master (forced update)$" output &&\n' span_id: 363 ) (Token id: Id.Lit_Chars val: '\tgrep "^ ! \\[rejected\\] *master -> retsam (non-fast-forward)$" output\n' span_id: 364 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'push fails for non-fast-forward refs unmatched by remote helper: our output' span_id: 371 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:375) (Token id: Id.Lit_Chars val: '\ttest_i18ngrep "Updates were rejected because" \\\n' span_id: 376 ) (Token id:Id.Lit_Chars val:'\t\toutput\n' span_id:377) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'push (chunked)' span_id:384))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:388) (Token id:Id.Lit_Chars val:'\tgit checkout master &&\n' span_id:389) (Token id:Id.Lit_Chars val:'\ttest_commit commit path3 &&\n' span_id:390) (Token id: Id.Lit_Chars val: '\tHEAD=$(git rev-parse --verify HEAD) &&\n' span_id: 391 ) (Token id:Id.Lit_Chars val:'\ttest_config http.postbuffer 4 &&\n' span_id:392) (Token id: Id.Lit_Chars val: '\tgit push -v -v origin $BRANCH 2>err &&\n' span_id: 393 ) (Token id:Id.Lit_Chars val:'\tgrep "POST git-receive-pack (chunked)" err &&\n' span_id:394) (Token id: Id.Lit_Chars val: '\t(cd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&\n' span_id: 395 ) (Token id:Id.Lit_Chars val:'\t test $HEAD = $(git rev-parse --verify HEAD))\n' span_id:396) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'push --all can push to empty repo' span_id:403))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:407) (Token id: Id.Lit_Chars val: '\td=$HTTPD_DOCUMENT_ROOT_PATH/empty-all.git &&\n' span_id: 408 ) (Token id:Id.Lit_Chars val:'\tgit init --bare "$d" &&\n' span_id:409) (Token id: Id.Lit_Chars val: '\tgit --git-dir="$d" config http.receivepack true &&\n' span_id: 410 ) (Token id:Id.Lit_Chars val:'\tgit push --all "$HTTPD_URL"/smart/empty-all.git\n' span_id:411) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'push --mirror can push to empty repo' span_id:418))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:422) (Token id: Id.Lit_Chars val: '\td=$HTTPD_DOCUMENT_ROOT_PATH/empty-mirror.git &&\n' span_id: 423 ) (Token id:Id.Lit_Chars val:'\tgit init --bare "$d" &&\n' span_id:424) (Token id: Id.Lit_Chars val: '\tgit --git-dir="$d" config http.receivepack true &&\n' span_id: 425 ) (Token id:Id.Lit_Chars val:'\tgit push --mirror "$HTTPD_URL"/smart/empty-mirror.git\n' span_id:426) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'push --all to repo with alternates' span_id:433))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:437) (Token id: Id.Lit_Chars val: '\ts=$HTTPD_DOCUMENT_ROOT_PATH/test_repo.git &&\n' span_id: 438 ) (Token id:Id.Lit_Chars val:'\td=$HTTPD_DOCUMENT_ROOT_PATH/alternates-all.git &&\n' span_id:439) (Token id: Id.Lit_Chars val: '\tgit clone --bare --shared "$s" "$d" &&\n' span_id: 440 ) (Token id:Id.Lit_Chars val:'\tgit --git-dir="$d" config http.receivepack true &&\n' span_id:441) (Token id:Id.Lit_Chars val:'\tgit --git-dir="$d" repack -adl &&\n' span_id:442) (Token id:Id.Lit_Chars val:'\tgit push --all "$HTTPD_URL"/smart/alternates-all.git\n' span_id:443) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'push --mirror to repo with alternates' span_id:450))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:454) (Token id: Id.Lit_Chars val: '\ts=$HTTPD_DOCUMENT_ROOT_PATH/test_repo.git &&\n' span_id: 455 ) (Token id:Id.Lit_Chars val:'\td=$HTTPD_DOCUMENT_ROOT_PATH/alternates-mirror.git &&\n' span_id:456) (Token id: Id.Lit_Chars val: '\tgit clone --bare --shared "$s" "$d" &&\n' span_id: 457 ) (Token id:Id.Lit_Chars val:'\tgit --git-dir="$d" config http.receivepack true &&\n' span_id:458) (Token id:Id.Lit_Chars val:'\tgit --git-dir="$d" repack -adl &&\n' span_id:459) (Token id: Id.Lit_Chars val: '\tgit push --mirror "$HTTPD_URL"/smart/alternates-mirror.git\n' span_id: 460 ) ) } ) (C {(test_expect_success)} {(TTY)} {(SQ (Token id:Id.Lit_Chars val:'push shows progress when stderr is a tty' span_id:469))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:473) (Token id:Id.Lit_Chars val:'\tcd "$ROOT_PATH"/test_repo_clone &&\n' span_id:474) (Token id:Id.Lit_Chars val:'\ttest_commit noisy &&\n' span_id:475) (Token id: Id.Lit_Chars val: '\ttest_terminal git push >output 2>&1 &&\n' span_id: 476 ) (Token id:Id.Lit_Chars val:'\ttest_i18ngrep "^Writing objects" output\n' span_id:477) ) } ) (C {(test_expect_success)} {(TTY)} {(SQ (Token id:Id.Lit_Chars val:'push --quiet silences status and progress' span_id:486))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:490) (Token id:Id.Lit_Chars val:'\tcd "$ROOT_PATH"/test_repo_clone &&\n' span_id:491) (Token id:Id.Lit_Chars val:'\ttest_commit quiet &&\n' span_id:492) (Token id: Id.Lit_Chars val: '\ttest_terminal git push --quiet >output 2>&1 &&\n' span_id: 493 ) (Token id:Id.Lit_Chars val:'\ttest_cmp /dev/null output\n' span_id:494) ) } ) (C {(test_expect_success)} {(TTY)} { (SQ (Token id: Id.Lit_Chars val: 'push --no-progress silences progress but not status' span_id: 503 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:507) (Token id:Id.Lit_Chars val:'\tcd "$ROOT_PATH"/test_repo_clone &&\n' span_id:508) (Token id:Id.Lit_Chars val:'\ttest_commit no-progress &&\n' span_id:509) (Token id: Id.Lit_Chars val: '\ttest_terminal git push --no-progress >output 2>&1 &&\n' span_id: 510 ) (Token id:Id.Lit_Chars val:'\ttest_i18ngrep "^To http" output &&\n' span_id:511) (Token id:Id.Lit_Chars val:'\ttest_i18ngrep ! "^Writing objects"\n' span_id:512) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'push --progress shows progress to non-tty' span_id:519))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:523) (Token id:Id.Lit_Chars val:'\tcd "$ROOT_PATH"/test_repo_clone &&\n' span_id:524) (Token id:Id.Lit_Chars val:'\ttest_commit progress &&\n' span_id:525) (Token id:Id.Lit_Chars val:'\tgit push --progress >output 2>&1 &&\n' span_id:526) (Token id:Id.Lit_Chars val:'\ttest_i18ngrep "^To http" output &&\n' span_id:527) (Token id: Id.Lit_Chars val: '\ttest_i18ngrep "^Writing objects" output\n' span_id: 528 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'http push gives sane defaults to reflog' span_id:535))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:539) (Token id:Id.Lit_Chars val:'\tcd "$ROOT_PATH"/test_repo_clone &&\n' span_id:540) (Token id:Id.Lit_Chars val:'\ttest_commit reflog-test &&\n' span_id:541) (Token id: Id.Lit_Chars val: '\tgit push "$HTTPD_URL"/smart/test_repo.git &&\n' span_id: 542 ) (Token id: Id.Lit_Chars val: '\tgit --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/test_repo.git" \\\n' span_id: 543 ) (Token id:Id.Lit_Chars val:'\t\tlog -g -1 --format="%gn <%ge>" >actual &&\n' span_id:544) (Token id: Id.Lit_Chars val: '\techo "anonymous <anonymous@http.127.0.0.1>" >expect &&\n' span_id: 545 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:546) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'http push respects GIT_COMMITTER_* in reflog' span_id:553))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:557) (Token id:Id.Lit_Chars val:'\tcd "$ROOT_PATH"/test_repo_clone &&\n' span_id:558) (Token id:Id.Lit_Chars val:'\ttest_commit custom-reflog-test &&\n' span_id:559) (Token id: Id.Lit_Chars val: '\tgit push "$HTTPD_URL"/smart_custom_env/test_repo.git &&\n' span_id: 560 ) (Token id: Id.Lit_Chars val: '\tgit --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/test_repo.git" \\\n' span_id: 561 ) (Token id:Id.Lit_Chars val:'\t\tlog -g -1 --format="%gn <%ge>" >actual &&\n' span_id:562) (Token id: Id.Lit_Chars val: '\techo "Custom User <custom@example.com>" >expect &&\n' span_id: 563 ) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:564) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'push over smart http with auth' span_id:571))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:575) (Token id:Id.Lit_Chars val:'\tcd "$ROOT_PATH/test_repo_clone" &&\n' span_id:576) (Token id:Id.Lit_Chars val:'\techo push-auth-test >expect &&\n' span_id:577) (Token id:Id.Lit_Chars val:'\ttest_commit push-auth-test &&\n' span_id:578) (Token id:Id.Lit_Chars val:'\tset_askpass user@host pass@host &&\n' span_id:579) (Token id: Id.Lit_Chars val: '\tgit push "$HTTPD_URL"/auth/smart/test_repo.git &&\n' span_id: 580 ) (Token id: Id.Lit_Chars val: '\tgit --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/test_repo.git" \\\n' span_id: 581 ) (Token id:Id.Lit_Chars val:'\t\tlog -1 --format=%s >actual &&\n' span_id:582) (Token id:Id.Lit_Chars val:'\texpect_askpass both user@host &&\n' span_id:583) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:584) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'push to auth-only-for-push repo' span_id:591))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:595) (Token id:Id.Lit_Chars val:'\tcd "$ROOT_PATH/test_repo_clone" &&\n' span_id:596) (Token id:Id.Lit_Chars val:'\techo push-half-auth >expect &&\n' span_id:597) (Token id:Id.Lit_Chars val:'\ttest_commit push-half-auth &&\n' span_id:598) (Token id:Id.Lit_Chars val:'\tset_askpass user@host pass@host &&\n' span_id:599) (Token id: Id.Lit_Chars val: '\tgit push "$HTTPD_URL"/auth-push/smart/test_repo.git &&\n' span_id: 600 ) (Token id: Id.Lit_Chars val: '\tgit --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/test_repo.git" \\\n' span_id: 601 ) (Token id:Id.Lit_Chars val:'\t\tlog -1 --format=%s >actual &&\n' span_id:602) (Token id:Id.Lit_Chars val:'\texpect_askpass both user@host &&\n' span_id:603) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:604) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'create repo without http.receivepack set' span_id:611))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:615) (Token id:Id.Lit_Chars val:'\tcd "$ROOT_PATH" &&\n' span_id:616) (Token id:Id.Lit_Chars val:'\tgit init half-auth &&\n' span_id:617) (Token id:Id.Lit_Chars val:'\t(\n' span_id:618) (Token id:Id.Lit_Chars val:'\t\tcd half-auth &&\n' span_id:619) (Token id:Id.Lit_Chars val:'\t\ttest_commit one\n' span_id:620) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:621) (Token id: Id.Lit_Chars val: '\tgit clone --bare half-auth "$HTTPD_DOCUMENT_ROOT_PATH/half-auth.git"\n' span_id: 622 ) ) } ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'clone via half-auth-complete does not need password' span_id: 629 ) ) } { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:633) (Token id:Id.Lit_Chars val:'\tcd "$ROOT_PATH" &&\n' span_id:634) (Token id:Id.Lit_Chars val:'\tset_askpass wrong &&\n' span_id:635) (Token id: Id.Lit_Chars val: '\tgit clone "$HTTPD_URL"/half-auth-complete/smart/half-auth.git \\\n' span_id: 636 ) (Token id:Id.Lit_Chars val:'\t\thalf-auth-clone &&\n' span_id:637) (Token id:Id.Lit_Chars val:'\texpect_askpass none\n' span_id:638) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'push into half-auth-complete requires password' span_id:645))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:649) (Token id:Id.Lit_Chars val:'\tcd "$ROOT_PATH/half-auth-clone" &&\n' span_id:650) (Token id:Id.Lit_Chars val:'\techo two >expect &&\n' span_id:651) (Token id:Id.Lit_Chars val:'\ttest_commit two &&\n' span_id:652) (Token id:Id.Lit_Chars val:'\tset_askpass user@host pass@host &&\n' span_id:653) (Token id: Id.Lit_Chars val: '\tgit push "$HTTPD_URL/half-auth-complete/smart/half-auth.git" &&\n' span_id: 654 ) (Token id: Id.Lit_Chars val: '\tgit --git-dir="$HTTPD_DOCUMENT_ROOT_PATH/half-auth.git" \\\n' span_id: 655 ) (Token id:Id.Lit_Chars val:'\t\tlog -1 --format=%s >actual &&\n' span_id:656) (Token id:Id.Lit_Chars val:'\texpect_askpass both user@host &&\n' span_id:657) (Token id:Id.Lit_Chars val:'\ttest_cmp expect actual\n' span_id:658) ) } ) (C {(test_expect_success)} {(CMDLINE_LIMIT)} {(SQ (Token id:Id.Lit_Chars val:'push 2000 tags over http' span_id:667))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:671) (Token id:Id.Lit_Chars val:'\tsha1=$(git rev-parse HEAD) &&\n' span_id:672) (Token id:Id.Lit_Chars val:'\ttest_seq 2000 |\n' span_id:673) (Token id:Id.Lit_Chars val:'\t sort |\n' span_id:674) (Token id:Id.Lit_Chars val:'\t sed "s|.*|$sha1 refs/tags/really-long-tag-name-&|" \\\n' span_id:675) (Token id:Id.Lit_Chars val:'\t >.git/packed-refs &&\n' span_id:676) (Token id:Id.Lit_Chars val:'\trun_with_limited_cmdline git push --mirror\n' span_id:677) ) } ) (C {(test_expect_success)} {(GPG)} {(SQ (Token id:Id.Lit_Chars val:'push with post-receive to inspect certificate' span_id:686))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:690) (Token id:Id.Lit_Chars val:'\t(\n' span_id:691) (Token id:Id.Lit_Chars val:'\t\tcd "$HTTPD_DOCUMENT_ROOT_PATH"/test_repo.git &&\n' span_id:692) (Token id:Id.Lit_Chars val:'\t\tmkdir -p hooks &&\n' span_id:693) (Token id:Id.Lit_Chars val:'\t\twrite_script hooks/post-receive <<-\\EOF &&\n' span_id:694) (Token id:Id.Lit_Chars val:'\t\t# discard the update list\n' span_id:695) (Token id:Id.Lit_Chars val:'\t\tcat >/dev/null\n' span_id:696) (Token id:Id.Lit_Chars val:'\t\t# record the push certificate\n' span_id:697) (Token id:Id.Lit_Chars val:'\t\tif test -n "${GIT_PUSH_CERT-}"\n' span_id:698) (Token id:Id.Lit_Chars val:'\t\tthen\n' span_id:699) (Token id:Id.Lit_Chars val:'\t\t\tgit cat-file blob $GIT_PUSH_CERT >../push-cert\n' span_id:700) (Token id:Id.Lit_Chars val:'\t\tfi &&\n' span_id:701) (Token id:Id.Lit_Chars val:'\t\tcat >../push-cert-status <<E_O_F\n' span_id:702) (Token id: Id.Lit_Chars val: '\t\tSIGNER=${GIT_PUSH_CERT_SIGNER-nobody}\n' span_id: 703 ) (Token id:Id.Lit_Chars val:'\t\tKEY=${GIT_PUSH_CERT_KEY-nokey}\n' span_id:704) (Token id: Id.Lit_Chars val: '\t\tSTATUS=${GIT_PUSH_CERT_STATUS-nostatus}\n' span_id: 705 ) (Token id: Id.Lit_Chars val: '\t\tNONCE_STATUS=${GIT_PUSH_CERT_NONCE_STATUS-nononcestatus}\n' span_id: 706 ) (Token id:Id.Lit_Chars val:'\t\tNONCE=${GIT_PUSH_CERT_NONCE-nononce}\n' span_id:707) (Token id:Id.Lit_Chars val:'\t\tE_O_F\n' span_id:708) (Token id:Id.Lit_Chars val:'\t\tEOF\n' span_id:709) (Token id:Id.Lit_Chars val:'\n' span_id:710) (Token id: Id.Lit_Chars val: '\t\tgit config receive.certnonceseed sekrit &&\n' span_id: 711 ) (Token id:Id.Lit_Chars val:'\t\tgit config receive.certnonceslop 30\n' span_id:712) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:713) (Token id:Id.Lit_Chars val:'\tcd "$ROOT_PATH/test_repo_clone" &&\n' span_id:714) (Token id:Id.Lit_Chars val:'\ttest_commit cert-test &&\n' span_id:715) (Token id:Id.Lit_Chars val:'\tgit push --signed "$HTTPD_URL/smart/test_repo.git" &&\n' span_id:716) (Token id:Id.Lit_Chars val:'\t(\n' span_id:717) (Token id:Id.Lit_Chars val:'\t\tcd "$HTTPD_DOCUMENT_ROOT_PATH" &&\n' span_id:718) (Token id:Id.Lit_Chars val:'\t\tcat <<-\\EOF &&\n' span_id:719) (Token id:Id.Lit_Chars val:'\t\tSIGNER=C O Mitter <committer@example.com>\n' span_id:720) (Token id:Id.Lit_Chars val:'\t\tKEY=13B6F51ECDDE430D\n' span_id:721) (Token id:Id.Lit_Chars val:'\t\tSTATUS=G\n' span_id:722) (Token id:Id.Lit_Chars val:'\t\tNONCE_STATUS=OK\n' span_id:723) (Token id:Id.Lit_Chars val:'\t\tEOF\n' span_id:724) (Token id: Id.Lit_Chars val: '\t\tsed -n -e "s/^nonce /NONCE=/p" -e "/^$/q" push-cert\n' span_id: 725 ) (Token id:Id.Lit_Chars val:'\t) >expect &&\n' span_id:726) (Token id: Id.Lit_Chars val: '\ttest_cmp expect "$HTTPD_DOCUMENT_ROOT_PATH/push-cert-status"\n' span_id: 727 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'push status output scrubs password' span_id:734))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:738) (Token id:Id.Lit_Chars val:'\tcd "$ROOT_PATH/test_repo_clone" &&\n' span_id:739) (Token id:Id.Lit_Chars val:'\tgit push --porcelain \\\n' span_id:740) (Token id: Id.Lit_Chars val: '\t\t"$HTTPD_URL_USER_PASS/smart/test_repo.git" \\\n' span_id: 741 ) (Token id:Id.Lit_Chars val:'\t\t+HEAD:scrub >status &&\n' span_id:742) (Token id: Id.Lit_Chars val: '\t# should have been scrubbed down to vanilla URL\n' span_id: 743 ) (Token id:Id.Lit_Chars val:'\tgrep "^To $HTTPD_URL/smart/test_repo.git" status\n' span_id:744) ) } ) (C {(stop_httpd)}) (C {(test_done)}) ] )