mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
738e5245fa
When a bundle provider wants to operate independently from a Git remote, they want to provide a single, consistent URI that users can use in their 'git clone --bundle-uri' commands. At this point, the Git client expects that URI to be a single bundle that can be unbundled and used to bootstrap the rest of the clone from the Git server. This single bundle cannot be re-used to assist with future incremental fetches. To allow for the incremental fetch case, teach Git to understand a bundle list that could be advertised at an independent bundle URI. Such a bundle list is likely to be inspected by human readers, even if only by the bundle provider creating the list. For this reason, we can take our expected "key=value" pairs and instead format them using Git config format. Create bundle_uri_parse_config_format() to parse a file in config format and convert that into a 'struct bundle_list' filled with its understanding of the contents. Be careful to use error_action CONFIG_ERROR_ERROR when calling git_config_from_file_with_options() because the default action for git_config_from_file() is to die() on a parsing error. The current warning isn't particularly helpful if it arises to a user, but it will be made more verbose at a higher layer later. Update 'test-tool bundle-uri' to take this config file format as input. It uses a filename instead of stdin because there is no existing way to parse a FILE pointer in the config machinery. Using git_config_from_mem() is overly complicated and more likely to introduce bugs than this simpler version. Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com> |
||
---|---|---|
.. | ||
.gitignore | ||
test-advise.c | ||
test-bitmap.c | ||
test-bloom.c | ||
test-bundle-uri.c | ||
test-chmtime.c | ||
test-config.c | ||
test-crontab.c | ||
test-csprng.c | ||
test-ctype.c | ||
test-date.c | ||
test-delta.c | ||
test-dir-iterator.c | ||
test-drop-caches.c | ||
test-dump-cache-tree.c | ||
test-dump-fsmonitor.c | ||
test-dump-split-index.c | ||
test-dump-untracked-cache.c | ||
test-example-decorate.c | ||
test-fake-ssh.c | ||
test-fast-rebase.c | ||
test-fsmonitor-client.c | ||
test-genrandom.c | ||
test-genzeros.c | ||
test-getcwd.c | ||
test-hash-speed.c | ||
test-hash.c | ||
test-hashmap.c | ||
test-hexdump.c | ||
test-index-version.c | ||
test-json-writer.c | ||
test-lazy-init-name-hash.c | ||
test-match-trees.c | ||
test-mergesort.c | ||
test-mktemp.c | ||
test-oid-array.c | ||
test-oidmap.c | ||
test-oidtree.c | ||
test-online-cpus.c | ||
test-pack-mtimes.c | ||
test-parse-options.c | ||
test-parse-pathspec-file.c | ||
test-partial-clone.c | ||
test-path-utils.c | ||
test-pcre2-config.c | ||
test-pkt-line.c | ||
test-prio-queue.c | ||
test-proc-receive.c | ||
test-progress.c | ||
test-reach.c | ||
test-read-cache.c | ||
test-read-graph.c | ||
test-read-midx.c | ||
test-ref-store.c | ||
test-reftable.c | ||
test-regex.c | ||
test-repository.c | ||
test-revision-walking.c | ||
test-run-command.c | ||
test-scrap-cache-tree.c | ||
test-serve-v2.c | ||
test-sha1.c | ||
test-sha1.sh | ||
test-sha256.c | ||
test-sigchain.c | ||
test-simple-ipc.c | ||
test-strcmp-offset.c | ||
test-string-list.c | ||
test-submodule-config.c | ||
test-submodule-nested-repo-config.c | ||
test-subprocess.c | ||
test-tool.c | ||
test-tool.h | ||
test-trace2.c | ||
test-urlmatch-normalization.c | ||
test-userdiff.c | ||
test-wildmatch.c | ||
test-windows-named-pipe.c | ||
test-write-cache.c | ||
test-xml-encode.c |