diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-05-02 13:37:53 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-05-02 13:37:53 +0200 |
commit | 61289ceee3417cd2aa8e8db9fe117a5813969aed (patch) | |
tree | bb4b7b5f43a31e6a6171f156d8465b6c36fa7a10 /src/libfetchers/git-utils.cc | |
parent | 564faa6b4e568f5d1da2b92909aecd2c4eccc26c (diff) |
Style fixes
Diffstat (limited to 'src/libfetchers/git-utils.cc')
-rw-r--r-- | src/libfetchers/git-utils.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libfetchers/git-utils.cc b/src/libfetchers/git-utils.cc index 060077098..b2d6b7893 100644 --- a/src/libfetchers/git-utils.cc +++ b/src/libfetchers/git-utils.cc @@ -2,7 +2,8 @@ #include <regex> -std::optional<std::string> parseListReferenceHeadRef(std::string_view line) { +std::optional<std::string> parseListReferenceHeadRef(std::string_view line) +{ const static std::regex head_ref_regex("^ref: ([^\\s]+)\\t+HEAD$"); std::match_results<std::string_view::const_iterator> match; if (std::regex_match(line.cbegin(), line.cend(), match, head_ref_regex)) { @@ -12,7 +13,8 @@ std::optional<std::string> parseListReferenceHeadRef(std::string_view line) { } } -std::optional<std::string> parseListReferenceForRev(std::string_view rev, std::string_view line) { +std::optional<std::string> parseListReferenceForRev(std::string_view rev, std::string_view line) +{ const static std::regex rev_regex("^([^\\t]+)\\t+(.*)$"); std::match_results<std::string_view::const_iterator> match; if (!std::regex_match(line.cbegin(), line.cend(), match, rev_regex)) { |