]> git.ipfire.org Git - thirdparty/git.git/commit - bundle-uri.c
bundle-uri: parse bundle.heuristic=creationToken
authorDerrick Stolee <derrickstolee@github.com>
Tue, 31 Jan 2023 13:29:12 +0000 (13:29 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 31 Jan 2023 16:57:48 +0000 (08:57 -0800)
commitc93c3d2fa42bec64948441cb339d78e2044ff9a3
tree8cf29470bf6343bcacfe862d7ba2ed31e7c16e1c
parent7bc73e7b61e60cbc0730a4f0e938c482c459e000
bundle-uri: parse bundle.heuristic=creationToken

The bundle.heuristic value communicates that the bundle list is
organized to make use of the bundle.<id>.creationToken values that may
be provided in the bundle list. Those values will create a total order
on the bundles, allowing the Git client to download them in a specific
order and even remember previously-downloaded bundles by storing the
maximum creation token value.

Before implementing any logic that parses or uses the
bundle.<id>.creationToken values, teach Git to parse the
bundle.heuristic value from a bundle list. We can use 'test-tool
bundle-uri' to print the heuristic value and verify that the parsing
works correctly.

As an extra precaution, create the internal 'heuristics' array to be a
list of (enum, string) pairs so we can iterate through the array entries
carefully, regardless of the enum values.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config/bundle.txt
bundle-uri.c
bundle-uri.h
t/t5750-bundle-uri-parse.sh