From 7cf0854121525747b438b7f94bf2d050f61fb615 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 18 Apr 2018 12:35:37 +0200 Subject: Implement git repository handling transition (phase 0) --- libbpkg/manifest.hxx | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'libbpkg/manifest.hxx') diff --git a/libbpkg/manifest.hxx b/libbpkg/manifest.hxx index a44ffcc..fdec69e 100644 --- a/libbpkg/manifest.hxx +++ b/libbpkg/manifest.hxx @@ -834,25 +834,28 @@ namespace bpkg return os << l.string (); } - // Branch and/or commit. At least one of them must be present. If both of - // them are present then the commit is expected to belong to the branch - // history. Note that the branch member can also denote a tag. + // Git refname and/or commit. At least one of them must be present. If both + // are present then the commit is expected to belong to the history of the + // specified ref (e.g., tag or branch). Note that the name member can also + // be an abbreviated commit id (full, 40-character commit ids should always + // be stored in the commit member since then may refer to an unadvertised + // commit). // - class LIBBPKG_EXPORT git_reference + class LIBBPKG_EXPORT git_ref_filter { public: - butl::optional branch; + butl::optional name; butl::optional commit; public: - // Parse the [][@] repository URL fragment representation. + // Parse the [][@] repository URL fragment representation. // explicit - git_reference (const butl::optional&); + git_ref_filter (const std::string&); - git_reference (butl::optional b, - butl::optional c) - : branch (std::move (b)), + git_ref_filter (butl::optional n, + butl::optional c) + : name (std::move (n)), commit (std::move (c)) {} }; -- cgit v1.1