Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2022-10-12 15:52:31 +0300
committerJunio C Hamano <gitster@pobox.com>2022-10-12 19:13:24 +0300
commit9424e373fd2136aa7f5cec23c8cafc272996ecd6 (patch)
tree85ca81d76f54a749060acad6c4de0564213a2cf8 /bundle-uri.h
parentbff03c47f7342c2a08fac6c0af7229b1579fea15 (diff)
bundle-uri: create "key=value" line parsing
When advertising a bundle list over Git's protocol v2, we will use packet lines. Each line will be of the form "key=value" representing a bundle list. Connect the API necessary for Git's transport to the key-value pair parsing created in the previous change. We are not currently implementing this protocol v2 functionality, but instead preparing to expose this parsing to be unit-testable. Co-authored-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'bundle-uri.h')
-rw-r--r--bundle-uri.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/bundle-uri.h b/bundle-uri.h
index ff7e3fd3fb..9058346192 100644
--- a/bundle-uri.h
+++ b/bundle-uri.h
@@ -67,4 +67,16 @@ int for_all_bundles_in_list(struct bundle_list *list,
*/
int fetch_bundle_uri(struct repository *r, const char *uri);
+/**
+ * General API for {transport,connect}.c etc.
+ */
+
+/**
+ * Parse a "key=value" packet line from the bundle-uri verb.
+ *
+ * Returns 0 on success and non-zero on error.
+ */
+int bundle_uri_parse_line(struct bundle_list *list,
+ const char *line);
+
#endif