summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-10-03Merge branch 'ds/perf-test-built-path-fix'Libravatar Junio C Hamano1-1/+1
Perf test fix. * ds/perf-test-built-path-fix: t/perf/run: fix bin-wrappers computation
2021-10-03Merge branch 'jk/http-redact-fix'Libravatar Junio C Hamano2-15/+15
Sensitive data in the HTTP trace were supposed to be redacted, but we failed to do so in HTTP/2 requests. * jk/http-redact-fix: http: match headers case-insensitively when redacting
2021-10-03Merge branch 'bs/ls-files-opt-help-text-update'Libravatar Junio C Hamano1-2/+2
Help text for "ls-files" options have been updated. * bs/ls-files-opt-help-text-update: ls-files: use imperative mood for -X and -z option description
2021-10-03Merge branch 'da/difftool-dir-diff-symlink-fix'Libravatar Junio C Hamano2-2/+67
"git difftool --dir-diff" mishandled symbolic links. * da/difftool-dir-diff-symlink-fix: difftool: fix symlink-file writing in dir-diff mode
2021-10-03Merge branch 'hn/refs-errno-cleanup'Libravatar Junio C Hamano7-151/+146
Futz with the way 'errno' is relied on in the refs API to carry the failure modes up the call chain. * hn/refs-errno-cleanup: refs: make errno output explicit for read_raw_ref_fn refs/files-backend: stop setting errno from lock_ref_oid_basic refs: remove EINVAL errno output from specification of read_raw_ref_fn refs file backend: move raceproof_create_file() here
2021-10-03Merge branch 'ab/refs-files-cleanup'Libravatar Junio C Hamano8-123/+64
Continued work on top of the hn/refs-errno-cleanup topic. * ab/refs-files-cleanup: refs/files: remove unused "errno != ENOTDIR" condition refs/files: remove unused "errno == EISDIR" code refs/files: remove unused "oid" in lock_ref_oid_basic() refs API: remove OID argument to reflog_expire() reflog expire: don't lock reflogs using previously seen OID refs/files: add a comment about refs_reflog_exists() call refs: make repo_dwim_log() accept a NULL oid refs/debug: re-indent argument list for "prepare" refs/files: remove unused "skip" in lock_raw_ref() too refs/files: remove unused "extras/skip" in lock_ref_oid_basic() refs: drop unused "flags" parameter to lock_ref_oid_basic() refs/files: remove unused REF_DELETING in lock_ref_oid_basic() refs/packet: add missing BUG() invocations to reflog callbacks
2021-10-03Merge branch 'cb/cvsserver'Libravatar Junio C Hamano3-17/+24
"git cvsserver" had a long-standing bug in its authentication code, which has finally been corrected (it is unclear and is a separate question if anybody is seriously using it, though). * cb/cvsserver: Documentation: cleanup git-cvsserver git-cvsserver: protect against NULL in crypt(3) git-cvsserver: use crypt correctly to compare password hashes
2021-10-03Merge branch 'jx/ci-l10n'Libravatar Junio C Hamano1-0/+105
CI help for l10n. * jx/ci-l10n: ci: new github-action for git-l10n code review
2021-10-03Merge branch 'jk/clone-unborn-head-in-bare'Libravatar Junio C Hamano2-16/+30
"git clone" from a repository whose HEAD is unborn into a bare repository didn't follow the branch name the other side used, which is corrected. * jk/clone-unborn-head-in-bare: clone: handle unborn branch in bare repos
2021-10-03Merge branch 'en/stash-df-fix'Libravatar Junio C Hamano2-3/+75
"git stash", where the tentative change involves changing a directory to a file (or vice versa), was confused, which has been corrected. * en/stash-df-fix: stash: restore untracked files AFTER restoring tracked files stash: avoid feeding directories to update-index t3903: document a pair of directory/file bugs
2021-09-28The ninth batchLibravatar Junio C Hamano1-0/+5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-28Merge branch 'en/typofixes'Libravatar Junio C Hamano2-2/+2
Typofixes. * en/typofixes: merge-ort: fix completely wrong comment trace2.h: fix trivial comment typo
2021-09-28Merge branch 'cb/unicode-14'Libravatar Junio C Hamano1-15/+29
The unicode character width table (used for output alignment) has been updated. * cb/unicode-14: unicode: update the width tables to Unicode 14
2021-09-28Merge branch 'jk/reduce-malloc-in-v2-servers'Libravatar Junio C Hamano4-59/+164
Code cleanup to limit memory consumption and tighten protocol message parsing. * jk/reduce-malloc-in-v2-servers: ls-refs: reject unknown arguments serve: reject commands used as capabilities serve: reject bogus v2 "command=ls-refs=foo" docs/protocol-v2: clarify some ls-refs ref-prefix details ls-refs: ignore very long ref-prefix counts serve: drop "keys" strvec serve: provide "receive" function for session-id capability serve: provide "receive" function for object-format capability serve: add "receive" method for v2 capabilities table serve: return capability "value" from get_capability() serve: rename is_command() to parse_command()
2021-09-23The eighth batchLibravatar Junio C Hamano1-0/+27
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-23Merge branch 'rs/use-xopen-in-index-pack'Libravatar Junio C Hamano2-8/+9
Code clean-up. * rs/use-xopen-in-index-pack: index-pack: use xopen in init_thread
2021-09-23Merge branch 'kz/revindex-comment-fix'Libravatar Junio C Hamano1-2/+2
Header comment fix. * kz/revindex-comment-fix: pack-revindex.h: correct the time complexity descriptions
2021-09-23Merge branch 'cb/plug-leaks-in-alloca-emu-users'Libravatar Junio C Hamano2-12/+15
Leakfix. * cb/plug-leaks-in-alloca-emu-users: t0000: avoid masking git exit value through pipes tree-diff: fix leak when not HAVE_ALLOCA_H
2021-09-23Merge branch 'jt/submodule-name-to-gitdir'Libravatar Junio C Hamano5-27/+72
Code refactoring. * jt/submodule-name-to-gitdir: submodule: extract path to submodule gitdir func
2021-09-23Merge branch 'ma/doc-git-version'Libravatar Junio C Hamano2-0/+32
Doc update. * ma/doc-git-version: documentation: add documentation for 'git version'
2021-09-23Merge branch 'ma/help-w-check-for-requested-page'Libravatar Junio C Hamano2-3/+22
The error in "git help no-such-git-command" is handled better. * ma/help-w-check-for-requested-page: help: make sure local html page exists before calling external processes
2021-09-23Merge branch 'cb/unix-sockets-with-windows'Libravatar Junio C Hamano3-10/+55
Adjust credential-cache helper to Windows. * cb/unix-sockets-with-windows: git-compat-util: include declaration for unix sockets in windows credential-cache: check for windows specific errors t0301: fixes for windows compatibility
2021-09-23Merge branch 'ab/retire-option-argument'Libravatar Junio C Hamano6-52/+26
An oddball OPTION_ARGUMENT feature has been removed from the parse-options API. * ab/retire-option-argument: parse-options API: remove OPTION_ARGUMENT feature difftool: use run_command() API in run_file_diff() difftool: prepare "diff" cmdline in cmd_difftool() difftool: prepare "struct child_process" in cmd_difftool()
2021-09-23Merge branch 'mr/bisect-in-c-4'Libravatar Junio C Hamano5-95/+186
Rewrite of "git bisect" in C continues. * mr/bisect-in-c-4: bisect--helper: retire `--bisect-next-check` subcommand bisect--helper: reimplement `bisect_run` shell function in C bisect--helper: reimplement `bisect_visualize()` shell function in C run-command: make `exists_in_PATH()` non-static t6030-bisect-porcelain: add test for bisect visualize t6030-bisect-porcelain: add tests to control bisect run exit cases
2021-09-23Merge branch 'ab/unused-script-helpers'Libravatar Junio C Hamano4-17/+2
Code clean-up. * ab/unused-script-helpers: test-lib: remove unused $_x40 and $_z40 variables git-bisect: remove unused SHA-1 $x40 shell variable git-sh-setup: remove unused "pull with rebase" message git-submodule: remove unused is_zero_oid() function
2021-09-23Merge branch 'ab/http-drop-old-curl-plus'Libravatar Junio C Hamano5-34/+157
Conditional compilation around versions of libcURL has been straightened out. * ab/http-drop-old-curl-plus: http: don't hardcode the value of CURL_SOCKOPT_OK http: centralize the accounting of libcurl dependencies http: correct curl version check for CURLOPT_PINNEDPUBLICKEY http: correct version check for CURL_HTTP_VERSION_2 http: drop support for curl < 7.18.0 (again) Makefile: drop support for curl < 7.9.8 (again) INSTALL: mention that we need libcurl 7.19.4 or newer to build INSTALL: reword and copy-edit the "libcurl" section INSTALL: don't mention the "curl" executable at all
2021-09-23Merge branch 'po/git-config-doc-mentions-help-c'Libravatar Junio C Hamano1-0/+3
Doc update. * po/git-config-doc-mentions-help-c: doc: config, tell readers of `git help --config`
2021-09-23Merge branch 'jk/http-server-protocol-versions'Libravatar Junio C Hamano7-4/+73
Taking advantage of the CGI interface, http-backend has been updated to enable protocol v2 automatically when the other side asks for it. * jk/http-server-protocol-versions: docs/protocol-v2: point readers transport config discussion docs/git: discuss server-side config for GIT_PROTOCOL docs/http-backend: mention v2 protocol http-backend: handle HTTP_GIT_PROTOCOL CGI variable t5551: test v2-to-v0 http protocol fallback
2021-09-23Merge branch 'ab/gc-remove-unused-call'Libravatar Junio C Hamano1-7/+1
Code clean-up. * ab/gc-remove-unused-call: gc: remove unused launchctl_get_uid() call
2021-09-23Merge branch 'ab/test-tool-run-command-cleanup'Libravatar Junio C Hamano1-4/+1
Code clean-up. * ab/test-tool-run-command-cleanup: test-tool run-command: fix flip-flop init pattern
2021-09-23Merge branch 'en/tests-cleanup-leftover-untracked'Libravatar Junio C Hamano12-4/+18
Test clean-up. * en/tests-cleanup-leftover-untracked: tests: remove leftover untracked files
2021-09-23Merge branch 'jk/strvec-typefix'Libravatar Junio C Hamano1-2/+2
Correct nr and alloc members of strvec struct to be of type size_t. * jk/strvec-typefix: strvec: use size_t to store nr and alloc
2021-09-23Merge branch 'rs/drop-core-compression-vars'Libravatar Junio C Hamano3-5/+0
Code clean-up. * rs/drop-core-compression-vars: compression: drop write-only core_compression_* variables
2021-09-23Merge branch 'rs/packfile-bad-object-list-in-oidset'Libravatar Junio C Hamano7-65/+32
Replace a handcrafted data structure used to keep track of bad objects in the packfile API by an oidset. * rs/packfile-bad-object-list-in-oidset: packfile: use oidset for bad objects packfile: convert has_packed_and_bad() to object_id packfile: convert mark_bad_packed_object() to object_id midx: inline nth_midxed_pack_entry() oidset: make oidset_size() an inline function
2021-09-23Merge branch 'en/am-abort-fix'Libravatar Junio C Hamano3-1/+43
When "git am --abort" fails to abort correctly, it still exited with exit status of 0, which has been corrected. * en/am-abort-fix: am: fix incorrect exit status on am fail to abort t4151: add a few am --abort tests git-am.txt: clarify --abort behavior
2021-09-23Merge branch 'ps/update-ref-batch-flush'Libravatar Junio C Hamano2-4/+44
"git update-ref --stdin" failed to flush its output as needed, which potentially led the conversation to a deadlock. * ps/update-ref-batch-flush: t1400: avoid SIGPIPE race condition on fifo update-ref: fix streaming of status updates
2021-09-23difftool: fix symlink-file writing in dir-diff modeLibravatar David Aguilar2-2/+67
The difftool dir-diff mode handles symlinks by replacing them with their readlink(2) values. This allows diff tools to see changes to symlinks as if they were regular text diffs with the old and new path values. This is analogous to what "git diff" displays when symlinks change. The temporary diff directories that are created initially contain symlinks because they get checked-out using a temporary index that retains the original symlinks as checked-in to the repository. A bug was introduced when difftool was rewritten in C that made difftool write the readlink(2) contents into the pointed-to file rather than the symlink itself. The write was going through the symlink and writing to its target rather than writing to the symlink path itself. Replace symlinks with raw text files by unlinking the symlink path before writing the readlink(2) content into them. When 18ec800512 (difftool: handle modified symlinks in dir-diff mode, 2017-03-15) added handling for modified symlinks this bug got recorded in the test suite. The tests included the pointed-to symlink target paths. These paths were being reported because difftool was erroneously writing to them, but they should have never been reported nor written. Correct the modified-symlinks test cases by removing the target files from the expected output. Add a test to ensure that symlinks are written with the readlink(2) values and that the target files contain their original content. Reported-by: Alan Blotz <work@blotz.org> Helped-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-22http: match headers case-insensitively when redactingLibravatar Jeff King2-15/+15
When HTTP/2 is in use, we fail to correctly redact "Authorization" (and other) headers in our GIT_TRACE_CURL output. We get the headers in our CURLOPT_DEBUGFUNCTION callback, curl_trace(). It passes them along to curl_dump_header(), which in turn checks redact_sensitive_header(). We see the headers as a text buffer like: Host: ... Authorization: Basic ... After breaking it into lines, we match each header using skip_prefix(). This is case-sensitive, even though HTTP headers are case-insensitive. This has worked reliably in the past because these headers are generated by curl itself, which is predictable in what it sends. But when HTTP/2 is in use, instead we get a lower-case "authorization:" header, and we fail to match it. The fix is simple: we should match with skip_iprefix(). Testing is more complicated, though. We do have a test for the redacting feature, but we don't hit the problem case because our test Apache setup does not understand HTTP/2. You can reproduce the issue by applying this on top of the test change in this patch: diff --git a/t/lib-httpd/apache.conf b/t/lib-httpd/apache.conf index afa91e38b0..19267c7107 100644 --- a/t/lib-httpd/apache.conf +++ b/t/lib-httpd/apache.conf @@ -29,6 +29,9 @@ ErrorLog error.log LoadModule setenvif_module modules/mod_setenvif.so </IfModule> +LoadModule http2_module modules/mod_http2.so +Protocols h2c + <IfVersion < 2.4> LockFile accept.lock </IfVersion> @@ -64,8 +67,8 @@ LockFile accept.lock <IfModule !mod_access_compat.c> LoadModule access_compat_module modules/mod_access_compat.so </IfModule> -<IfModule !mod_mpm_prefork.c> - LoadModule mpm_prefork_module modules/mod_mpm_prefork.so +<IfModule !mod_mpm_event.c> + LoadModule mpm_event_module modules/mod_mpm_event.so </IfModule> <IfModule !mod_unixd.c> LoadModule unixd_module modules/mod_unixd.so diff --git a/t/t5551-http-fetch-smart.sh b/t/t5551-http-fetch-smart.sh index 1c2a444ae7..ff74f0ae8a 100755 --- a/t/t5551-http-fetch-smart.sh +++ b/t/t5551-http-fetch-smart.sh @@ -24,6 +24,10 @@ test_expect_success 'create http-accessible bare repository' ' git push public main:main ' +test_expect_success 'prefer http/2' ' + git config --global http.version HTTP/2 +' + setup_askpass_helper test_expect_success 'clone http repository' ' but this has a few issues: - it's not necessarily portable. The http2 apache module might not be available on all systems. Further, the http2 module isn't compatible with the prefork mpm, so we have to switch to something else. But we don't necessarily know what's available. It would be nice if we could have conditional config, but IfModule only tells us if a module is already loaded, not whether it is available at all. This might be a non-issue. The http tests are already optional, and modern-enough systems may just have both of these. But... - if we do this, then we'd no longer be testing HTTP/1.1 at all. I'm not sure how much that matters since it's all handled by curl under the hood, but I'd worry that some detail leaks through. We'd probably want two scripts running similar tests, one with HTTP/2 and one with HTTP/1.1. - speaking of which, a later test fails with the patch above! The problem is that it is making sure we used a chunked transfer-encoding by looking for that header in the trace. But HTTP/2 doesn't support that, as it has its own streaming mechanisms (the overall operation works fine; we just don't see the header in the trace). Furthermore, even with the changes above, this test still does not detect the current failure, because we see _both_ HTTP/1.1 and HTTP/2 requests, which confuse it. Quoting only the interesting bits from the resulting trace file, we first see: => Send header: GET /auth/smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1 => Send header: Connection: Upgrade, HTTP2-Settings => Send header: Upgrade: h2c => Send header: HTTP2-Settings: AAMAAABkAAQCAAAAAAIAAAAA <= Recv header: HTTP/1.1 401 Unauthorized <= Recv header: Date: Wed, 22 Sep 2021 20:03:32 GMT <= Recv header: Server: Apache/2.4.49 (Debian) <= Recv header: WWW-Authenticate: Basic realm="git-auth" So the client asks for HTTP/2, but Apache does not do the upgrade for the 401 response. Then the client repeats with credentials: => Send header: GET /auth/smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1 => Send header: Authorization: Basic <redacted> => Send header: Connection: Upgrade, HTTP2-Settings => Send header: Upgrade: h2c => Send header: HTTP2-Settings: AAMAAABkAAQCAAAAAAIAAAAA <= Recv header: HTTP/1.1 101 Switching Protocols <= Recv header: Upgrade: h2c <= Recv header: Connection: Upgrade <= Recv header: HTTP/2 200 <= Recv header: content-type: application/x-git-upload-pack-advertisement So the client does properly redact there, because we're speaking HTTP/1.1, and the server indicates it can do the upgrade. And then the client will make further requests using HTTP/2: => Send header: POST /auth/smart/repo.git/git-upload-pack HTTP/2 => Send header: authorization: Basic dXNlckBob3N0OnBhc3NAaG9zdA== => Send header: content-type: application/x-git-upload-pack-request And there we can see that the credential is _not_ redacted. This part of the test is what gets confused: # Ensure that there is no "Basic" followed by a base64 string, but that # the auth details are redacted ! grep "Authorization: Basic [0-9a-zA-Z+/]" trace && grep "Authorization: Basic <redacted>" trace The first grep does not match the un-redacted HTTP/2 header, because it insists on an uppercase "A". And the second one does find the HTTP/1.1 header. So as far as the test is concerned, everything is OK, but it failed to notice the un-redacted lines. We can make this test (and the other related ones) more robust by adding "-i" to grep case-insensitively. This isn't really doing anything for now, since we're not actually speaking HTTP/2, but it future-proofs the tests for a day when we do (either we add explicit HTTP/2 test support, or it's eventually enabled by default by our Apache+curl test setup). And it doesn't hurt in the meantime for the tests to be more careful. The change to use "grep -i", coupled with the changes to use HTTP/2 shown above, causes the test to fail with the current code, and pass after this patch is applied. And finally, there's one other way to demonstrate the issue (and how I actually found it originally). Looking at GIT_TRACE_CURL output against github.com, you'll see the unredacted output, even if you didn't set http.version. That's because setting it is only necessary for curl to send the extra headers in its HTTP/1.1 request that say "Hey, I speak HTTP/2; upgrade if you do, too". But for a production site speaking https, the server advertises via ALPN, a TLS extension, that it supports HTTP/2, and the client can immediately start using it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-22t/perf/run: fix bin-wrappers computationLibravatar Derrick Stolee1-1/+1
The GIT_TEST_INSTALLED was moved from perf-lib.sh to run in df0f5021 (perf-lib.sh: remove GIT_TEST_INSTALLED from perf-lib.sh, 2019-05-07) and that included a change to how it inspected the existence of a bin-wrappers directory. However, that included a typo that made the match of bin-wrappers never work. Specifically, the assignment was mydir_abs_wrappers="$mydir_abs_wrappers/bin-wrappers" which uses the same variable before it is initialized. By changing it to mydir_abs_wrappers="$mydir_abs/bin-wrappers" We can correctly use the bin-wrappers directory. This is critical to successfully computing performance of commands that execute subcommands. The bin-wrappers ensure that the --exec-path is set correctly. Reported-by: Victoria Dye <vdye@github.com> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-22ls-files: use imperative mood for -X and -z option descriptionLibravatar Bagas Sanjaya1-2/+2
Usage description for -X and -z options use descriptive instead of imperative mood. Edit it for consistency with other options. Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-20The seventh batchLibravatar Junio C Hamano1-0/+52
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2021-09-20Merge branch 'jk/t5562-racefix'Libravatar Junio C Hamano1-8/+8
Test update. * jk/t5562-racefix: t5562: use alarm() to interrupt timed child-wait
2021-09-20Merge branch 'rs/no-mode-to-open-when-appending'Libravatar Junio C Hamano1-1/+1
The "mode" word is useless in a call to open(2) that does not create a new file. Such a call in the files backend of the ref subsystem has been cleaned up. * rs/no-mode-to-open-when-appending: refs/files-backend: remove unused open mode parameter
2021-09-20Merge branch 'rs/setup-use-xopen-and-xdup'Libravatar Junio C Hamano1-5/+3
Code clean-up. * rs/setup-use-xopen-and-xdup: setup: use xopen and xdup in sanitize_stdfds
2021-09-20Merge branch 'js/run-command-close-packs'Libravatar Junio C Hamano10-27/+32
The run-command API has been updated so that the callers can easily ask the file descriptors open for packfiles to be closed immediately before spawning commands that may trigger auto-gc. * js/run-command-close-packs: Close object store closer to spawning child processes run_auto_maintenance(): implicitly close the object store run-command: offer to close the object store before running run-command: prettify the `RUN_COMMAND_*` flags pull: release packs before fetching commit-graph: when closing the graph, also release the slab
2021-09-20Merge branch 'ds/mergies-with-sparse-index'Libravatar Junio C Hamano8-10/+129
Various mergy operations have been prepared to work efficiently with the sparse index. * ds/mergies-with-sparse-index: sparse-index: integrate with cherry-pick and rebase sequencer: ensure full index if not ORT strategy t1092: add cherry-pick, rebase tests merge-ort: expand only for out-of-cone conflicts merge: make sparse-aware with ORT diff: ignore sparse paths in diffstat
2021-09-20Merge branch 'ds/sparse-index-ignored-files'Libravatar Junio C Hamano12-62/+312
In cone mode, the sparse-index code path learned to remove ignored files (like build artifacts) outside the sparse cone, allowing the entire directory outside the sparse cone to be removed, which is especially useful when the sparse patterns change. * ds/sparse-index-ignored-files: sparse-checkout: clear tracked sparse dirs sparse-index: add SPARSE_INDEX_MEMORY_ONLY flag attr: be careful about sparse directories sparse-checkout: create helper methods sparse-index: use WRITE_TREE_MISSING_OK sparse-index: silently return when cache tree fails unpack-trees: fix nested sparse-dir search sparse-index: silently return when not using cone-mode patterns t7519: rewrite sparse index test
2021-09-20Merge branch 'ar/submodule-run-update-procedure'Libravatar Junio C Hamano2-73/+290
Reimplementation of parts of "git submodule" in C continues. * ar/submodule-run-update-procedure: submodule--helper: run update procedures from C
2021-09-20Merge branch 'ab/make-tags-cleanup'Libravatar Junio C Hamano1-13/+19
Build clean-up for "make tags" and friends. * ab/make-tags-cleanup: Makefile: normalize clobbering & xargs for tags targets Makefile: remove "cscope.out", not "cscope*" in cscope.out target Makefile: don't use "FORCE" for tags targets Makefile: add QUIET_GEN to "cscope" target Makefile: move ".PHONY: cscope" near its target
2021-09-20Merge branch 'ab/serve-cleanup'Libravatar Junio C Hamano20-128/+298
Code clean-up around "git serve". * ab/serve-cleanup: upload-pack: document and rename --advertise-refs serve.[ch]: remove "serve_options", split up --advertise-refs code {upload,receive}-pack tests: add --advertise-refs tests serve.c: move version line to advertise_capabilities() serve: move transfer.advertiseSID check into session_id_advertise() serve.[ch]: don't pass "struct strvec *keys" to commands serve: use designated initializers transport: use designated initializers transport: rename "fetch" in transport_vtable to "fetch_refs" serve: mark has_capability() as static