diff --git a/.github/workflows/build_and_run_tests.yml b/.github/workflows/build_and_run_tests.yml index cd9cc80..47ad69c 100644 --- a/.github/workflows/build_and_run_tests.yml +++ b/.github/workflows/build_and_run_tests.yml @@ -28,7 +28,7 @@ jobs: name: Build and Tests strategy: matrix: - os: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04 ] + os: [ ubuntu-22.04, ubuntu-24.04 ] runs-on: ${{ matrix.os }} steps: - run: | diff --git a/LIBNO b/LIBNO index 54f96bd..e348054 100644 --- a/LIBNO +++ b/LIBNO @@ -1 +1 @@ -LIBNO = 0.5.1 +LIBNO = 0.5.2 diff --git a/debian/control b/debian/control index 5fd69fa..c25647e 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: devel Priority: optional Maintainer: Jannik Woehnert Standards-Version: 4.6.0 -Build-Depends: dev-doocs-libgul14 | libgul14-dev, meson (>=0.50.0), pkg-config, debhelper-compat (=12), catch2 (>=3.4.0) | libcatch2, libgit2-dev +Build-Depends: gul17-dev, meson (>=0.50.0), pkg-config, debhelper-compat (=12), catch2 (>=3.4.0) | libcatch2, libgit2-dev Package: libgit4cpp-0-5-1 Section: libs diff --git a/include/libgit4cpp/Remote.h b/include/libgit4cpp/Remote.h index be301b9..8947c23 100644 --- a/include/libgit4cpp/Remote.h +++ b/include/libgit4cpp/Remote.h @@ -4,7 +4,7 @@ * \date Created on January 15, 2024 * \brief Declaration of the Remote class. * - * \copyright Copyright 2024 Deutsches Elektronen-Synchrotron (DESY), Hamburg + * \copyright Copyright 2024-2025 Deutsches Elektronen-Synchrotron (DESY), Hamburg * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -26,10 +26,9 @@ #define LIBGIT4CPP_REMOTE_H_ #include +#include #include -#include -#include #include "libgit4cpp/types.h" diff --git a/include/libgit4cpp/Repository.h b/include/libgit4cpp/Repository.h index d03af09..9c3326f 100644 --- a/include/libgit4cpp/Repository.h +++ b/include/libgit4cpp/Repository.h @@ -4,7 +4,7 @@ * \date Created on March 20, 2023 * \brief Wrapper for C-Package libgit2 * - * \copyright Copyright 2023-2024 Deutsches Elektronen-Synchrotron (DESY), Hamburg + * \copyright Copyright 2023-2025 Deutsches Elektronen-Synchrotron (DESY), Hamburg * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -26,11 +26,12 @@ #define LIBGIT4CPP_REPOSITORY_H_ #include +#include #include #include #include -#include +#include #include "libgit4cpp/Remote.h" #include "libgit4cpp/types.h" @@ -47,7 +48,7 @@ struct FileStatus std::string changes; /// Change status of file [new file, deleted, renamed, typechanged, modified, unchanged, ignored, untracked] friend std::ostream& operator<<(std::ostream& stream, FileStatus const& state) { - stream << "FileStatus{ \"" << gul14::escape(state.path_name) << "\": " << state.handling << "; " << state.changes << " }"; + stream << "FileStatus{ \"" << gul17::escape(state.path_name) << "\": " << state.handling << "; " << state.changes << " }"; return stream; } }; @@ -189,7 +190,7 @@ class Repository * Look up a git remote by name in the repository. * \returns a Remote object if the remote exists, or an empty optional otherwise. */ - gul14::optional get_remote(const std::string& remote_name) const; + std::optional get_remote(const std::string& remote_name) const; /** * Return a list of all configured remote repositories. diff --git a/meson.build b/meson.build index 773e24a..9858c84 100644 --- a/meson.build +++ b/meson.build @@ -55,7 +55,7 @@ inc = [ ] subdir('include') subdir('src') -gul_dep = dependency('libgul14', version : '> 2.6', fallback : [ 'libgul14', 'libgul_dep' ]) +gul_dep = dependency('gul17', fallback : [ 'gul17', 'libgul_dep' ]) libgit2_dep = dependency('libgit2') deps = [ @@ -93,7 +93,7 @@ pkg.generate(lib, version : libno, filebase : pkg_config_name, libraries : [ '-Wl,-rpath,${libdir}' ], - requires : [ 'libgul14', 'libgit2' ], + requires : [ 'gul17', 'libgit2' ], ) diff --git a/src/Remote.cc b/src/Remote.cc index 73384f4..de69bb6 100644 --- a/src/Remote.cc +++ b/src/Remote.cc @@ -4,7 +4,7 @@ * \date Created on January 15, 2024 * \brief Implementation of the Remote class. * - * \copyright Copyright 2024 Deutsches Elektronen-Synchrotron (DESY), Hamburg + * \copyright Copyright 2024-2025 Deutsches Elektronen-Synchrotron (DESY), Hamburg * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -23,14 +23,14 @@ // SPDX-License-Identifier: LGPL-2.1-or-later #include -#include +#include +#include "credentials_callback.h" #include "libgit4cpp/Error.h" #include "libgit4cpp/Remote.h" #include "libgit4cpp/wrapper_functions.h" -#include "credentials_callback.h" -using gul14::cat; +using gul17::cat; namespace git { diff --git a/src/Repository.cc b/src/Repository.cc index fce23a5..30f0871 100644 --- a/src/Repository.cc +++ b/src/Repository.cc @@ -4,7 +4,7 @@ * \date Created on March 20, 2023 * \brief Implementation of the Repository class. * - * \copyright Copyright 2023-2024 Deutsches Elektronen-Synchrotron (DESY), Hamburg + * \copyright Copyright 2023-2025 Deutsches Elektronen-Synchrotron (DESY), Hamburg * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -22,19 +22,20 @@ // SPDX-License-Identifier: LGPL-2.1-or-later +#include #include #include #include -#include -#include +#include +#include #include "libgit4cpp/Error.h" #include "libgit4cpp/Repository.h" #include "libgit4cpp/wrapper_functions.h" #include "credentials_callback.h" -using gul14::cat; +using gul17::cat; namespace git { @@ -441,7 +442,7 @@ Remote Repository::add_remote(const std::string& remote_name, const std::string& return Remote{ std::move(remote) }; } -gul14::optional Repository::get_remote(const std::string& remote_name) const +std::optional Repository::get_remote(const std::string& remote_name) const { auto remote = remote_lookup(repo_.get(), remote_name); if (!remote) @@ -477,7 +478,7 @@ std::vector Repository::list_remote_names() const int err = git_remote_list(&remotes, repo_.get()); if (err) throw Error{ cat("Cannot list remotes: ", git_error_last()->message) }; - auto cleanup = gul14::finally([&remotes]() { git_strarray_free(&remotes); }); + auto cleanup = gul17::finally([&remotes]() { git_strarray_free(&remotes); }); std::vector list; list.reserve(remotes.count); diff --git a/src/wrapper_functions.cc b/src/wrapper_functions.cc index 9118a10..0d44b27 100644 --- a/src/wrapper_functions.cc +++ b/src/wrapper_functions.cc @@ -4,7 +4,7 @@ * \date Created on March 20, 2023 * \brief Implementation of wrappers for libgit2 functions. * - * \copyright Copyright 2023 Deutsches Elektronen-Synchrotron (DESY), Hamburg + * \copyright Copyright 2023-2025 Deutsches Elektronen-Synchrotron (DESY), Hamburg * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published @@ -23,8 +23,8 @@ // SPDX-License-Identifier: LGPL-2.1-or-later #include -#include -#include +#include +#include #include "libgit4cpp/wrapper_functions.h" #include "libgit4cpp/Error.h" @@ -36,7 +36,7 @@ LibGitRepository repository_open(const std::string& repo_path) git_repository* repo; if (git_repository_open(&repo, repo_path.c_str())) { - // gul14::cat("repository_open: ", git_error_last()->message); + // gul17::cat("repository_open: ", git_error_last()->message); repo = nullptr; } @@ -55,7 +55,7 @@ LibGitRepository repository_init(const std::string& repo_path, bool is_bare) int error = git_repository_init_ext(&repo, repo_path.c_str(), &opts); if (error) { - // gul14::cat("repository_init: ", git_error_last()->message); + // gul17::cat("repository_init: ", git_error_last()->message); repo = nullptr; } return { repo, git_repository_free }; @@ -66,7 +66,7 @@ LibGitIndex repository_index(git_repository* repo) git_index* index; if (git_repository_index(&index, repo)) { - // gul14::cat("repository_index: ", git_error_last()->message); + // gul17::cat("repository_index: ", git_error_last()->message); index = nullptr; } return { index, git_index_free }; @@ -77,7 +77,7 @@ LibGitSignature signature_default(git_repository* repo) git_signature* signature; if (git_signature_default(&signature, repo)) { - // gul14::cat("signature_default: ", git_error_last()->message); + // gul17::cat("signature_default: ", git_error_last()->message); signature = nullptr; } return { signature, git_signature_free }; @@ -88,7 +88,7 @@ LibGitSignature signature_new(const std::string& name, const std::string& email, git_signature* signature; if (git_signature_new(&signature, name.c_str(), email.c_str(), time, offset)) { - // gul14::cat("signature_new: ", git_error_last()->message); + // gul17::cat("signature_new: ", git_error_last()->message); signature = nullptr; } return { signature, git_signature_free }; @@ -99,7 +99,7 @@ LibGitTree tree_lookup(git_repository* repo, git_oid tree_id) git_tree* tree; if (git_tree_lookup(&tree, repo, &tree_id)) { - // gul14::cat("tree_lookup: ", git_error_last()->message); + // gul17::cat("tree_lookup: ", git_error_last()->message); tree = nullptr; } return { tree, git_tree_free }; @@ -111,7 +111,7 @@ LibGitRemote remote_create(git_repository* repo, const std::string& remote_name, git_remote* remote; if (git_remote_create(&remote, repo, remote_name.c_str(), url.c_str())) { - // gul14::cat("remote_create: ", git_error_last()->message); + // gul17::cat("remote_create: ", git_error_last()->message); remote = nullptr; } return { remote, git_remote_free }; @@ -130,7 +130,7 @@ LibGitStatusList status_list_new(git_repository* repo, const git_status_options& git_status_list* status; if (git_status_list_new(&status, repo, &status_opt)) { - // gul14::cat("status_list_new: ", git_error_last()->message); + // gul17::cat("status_list_new: ", git_error_last()->message); status = nullptr; } return { status, git_status_list_free }; @@ -141,7 +141,7 @@ LibGitReference repository_head(git_repository* repo) git_reference* reference; if (git_repository_head(&reference, repo)) { - // gul14::cat("reposiotry_head: ", git_error_last()->message); + // gul17::cat("reposiotry_head: ", git_error_last()->message); reference = nullptr; } return { reference, git_reference_free }; @@ -152,7 +152,7 @@ LibGitRepository clone(const std::string& url, const std::string& repo_path) git_repository* repo; if (git_clone(&repo, url.c_str(), repo_path.c_str(), nullptr)) { - // gul14::cat("branch_remote_name: ", git_error_last()->message); + // gul17::cat("branch_remote_name: ", git_error_last()->message); repo = nullptr; } return { repo, git_repository_free }; @@ -164,7 +164,7 @@ LibGitReference branch_lookup(git_repository* repo, const std::string& branch_na git_reference* ref; if (git_branch_lookup(&ref, repo, branch_name.c_str(), branch_type)) { - // gul14::cat("branch_lookup: ", git_error_last()->message); + // gul17::cat("branch_lookup: ", git_error_last()->message); ref = nullptr; } return { ref, git_reference_free }; @@ -191,10 +191,10 @@ LibGitReference branch_create(git_repository* repo, const std::string& new_branc std::string branch_remote_name(git_repository* repo, const std::string& branch_name) { git_buf buf{ }; - auto _ = gul14::finally([buf_addr = &buf]() { git_buf_dispose(buf_addr); }); + auto _ = gul17::finally([buf_addr = &buf]() { git_buf_dispose(buf_addr); }); auto error = git_branch_remote_name(&buf, repo, branch_name.c_str()); if (error) { - throw Error{ error, gul14::cat("branch_remote_name: ", git_error_last()->message) }; + throw Error{ error, gul17::cat("branch_remote_name: ", git_error_last()->message) }; } auto ret = std::string{ buf.ptr }; return ret; @@ -204,7 +204,7 @@ std::string reference_shorthand(const git_reference* ref) { const char* name_cstr = git_reference_shorthand(ref); if (name_cstr == nullptr) - throw Error{gul14::cat("reference_shorthand: ", git_error_last()->message) }; + throw Error{gul17::cat("reference_shorthand: ", git_error_last()->message) }; return std::string(name_cstr); } @@ -212,7 +212,7 @@ std::string reference_name(git_reference* ref) { const char* name_cstr = git_reference_name(ref); if (name_cstr == nullptr) - throw Error{gul14::cat("reference_name: ", git_error_last()->message) }; + throw Error{gul17::cat("reference_name: ", git_error_last()->message) }; return std::string(name_cstr); } @@ -221,7 +221,7 @@ LibGitReference parse_reference_from_name(git_repository* repo, const std::strin git_reference* ref; auto error = git_reference_dwim(&ref, repo, name.c_str()); if (error) - throw Error{gul14::cat("parse_reference_from_name: ", git_error_last()->message) }; + throw Error{gul17::cat("parse_reference_from_name: ", git_error_last()->message) }; return {ref, git_reference_free}; } @@ -230,7 +230,7 @@ LibGitBranchIterator branch_iterator(git_repository* repo, git_branch_t flag) git_branch_iterator* iter; auto error = git_branch_iterator_new(&iter, repo, flag); if (error) - throw Error{gul14::cat("get_branch_iterator: ", git_error_last()->message) }; + throw Error{gul17::cat("get_branch_iterator: ", git_error_last()->message) }; return {iter, git_branch_iterator_free}; } diff --git a/subprojects/gul17.wrap b/subprojects/gul17.wrap new file mode 100644 index 0000000..fb82bc8 --- /dev/null +++ b/subprojects/gul17.wrap @@ -0,0 +1,8 @@ +[wrap-git] +directory = gul17 +url = https://github.com/gul-cpp/gul17.git +revision = main + +[provide] +dependency_names = gul17 +gul17 = libgul_dep diff --git a/subprojects/libgul14.wrap b/subprojects/libgul14.wrap deleted file mode 100644 index eefb415..0000000 --- a/subprojects/libgul14.wrap +++ /dev/null @@ -1,7 +0,0 @@ -[wrap-git] -directory = libgul14 -url = https://github.com/gul-cpp/gul14.git -revision = main - -[provide] -libgul14 = libgul_dep diff --git a/tests/test_Remote.cc b/tests/test_Remote.cc index 40e929d..634cac4 100644 --- a/tests/test_Remote.cc +++ b/tests/test_Remote.cc @@ -22,12 +22,12 @@ // SPDX-License-Identifier: LGPL-2.1-or-later +#include #include #include #include #include -#include #include "libgit4cpp/Error.h" #include "libgit4cpp/Repository.h" @@ -37,7 +37,6 @@ using namespace git; using namespace std::literals; -using gul14::cat; static const auto working_dir = unit_test_folder() / "Remote_list_references"; static const auto remote_repo = unit_test_folder() / "Remote_list_references.remote"; diff --git a/tests/test_Repository.cc b/tests/test_Repository.cc index f875da5..1258bec 100644 --- a/tests/test_Repository.cc +++ b/tests/test_Repository.cc @@ -28,7 +28,9 @@ #include #include -#include +#include +#include +#include #include "libgit4cpp/Error.h" #include "libgit4cpp/Repository.h" @@ -37,7 +39,7 @@ using namespace git; using namespace std::literals; -using gul14::cat; +using gul17::cat; namespace { @@ -121,7 +123,7 @@ TEST_CASE("Repository Wrapper Test all", "[Repository]") REQUIRE(stats.size() != 0); for (const auto& elm: stats) { - if (gul14::starts_with(elm.path_name, "unit_test_1") || gul14::starts_with(elm.path_name, "unit_test_2")) + if (gul17::starts_with(elm.path_name, "unit_test_1") || gul17::starts_with(elm.path_name, "unit_test_2")) { REQUIRE(elm.handling == "untracked"); REQUIRE(elm.changes == "untracked"); @@ -136,7 +138,7 @@ TEST_CASE("Repository Wrapper Test all", "[Repository]") REQUIRE(stats.size() != 0); for (const auto& elm: stats) { - if (gul14::starts_with(elm.path_name, "unit_test_1") || gul14::starts_with(elm.path_name, "unit_test_2")) + if (gul17::starts_with(elm.path_name, "unit_test_1") || gul17::starts_with(elm.path_name, "unit_test_2")) { REQUIRE(elm.handling == "staged"); REQUIRE(elm.changes == "new file"); @@ -163,7 +165,7 @@ TEST_CASE("Repository Wrapper Test all", "[Repository]") REQUIRE(stats.size() != 0); for (const auto& elm: stats) { - if (gul14::starts_with(elm.path_name, "unit_test_1") || gul14::starts_with(elm.path_name, "unit_test_2")) + if (gul17::starts_with(elm.path_name, "unit_test_1") || gul17::starts_with(elm.path_name, "unit_test_2")) { REQUIRE(elm.handling == "staged"); REQUIRE(elm.changes == "new file"); @@ -179,7 +181,7 @@ TEST_CASE("Repository Wrapper Test all", "[Repository]") REQUIRE(stats.size() != 0); for (const auto& elm: stats) { - if (gul14::starts_with(elm.path_name, "unit_test_1") || gul14::starts_with(elm.path_name, "unit_test_2")) + if (gul17::starts_with(elm.path_name, "unit_test_1") || gul17::starts_with(elm.path_name, "unit_test_2")) { REQUIRE(elm.handling == "unchanged"); REQUIRE(elm.changes == "unchanged"); @@ -207,12 +209,12 @@ TEST_CASE("Repository Wrapper Test all", "[Repository]") REQUIRE(stats.size() != 0); for (const auto& elm: stats) { - if (gul14::starts_with(elm.path_name, "unit_test_1/file")) + if (gul17::starts_with(elm.path_name, "unit_test_1/file")) { REQUIRE(elm.handling == "unstaged"); REQUIRE(elm.changes == "modified"); } - else if (gul14::starts_with(elm.path_name, "unit_test_2/file")) + else if (gul17::starts_with(elm.path_name, "unit_test_2/file")) { REQUIRE(elm.handling == "unchanged"); REQUIRE(elm.changes == "unchanged"); @@ -222,7 +224,7 @@ TEST_CASE("Repository Wrapper Test all", "[Repository]") // Try the dump to stream operator with some 'interesting' state: std::stringstream ss{ }; ss << stats; - REQUIRE(gul14::trim(ss.str()) == "RepoState {\n" \ + REQUIRE(gul17::trim(ss.str()) == "RepoState {\n" \ "FileStatus{ \"unit_test_1/file0.txt\": unstaged; modified }\n" \ "FileStatus{ \"unit_test_1/file1.txt\": unstaged; modified }\n" \ "FileStatus{ \"unit_test_2/file0.txt\": unchanged; unchanged }\n" \ @@ -238,17 +240,17 @@ TEST_CASE("Repository Wrapper Test all", "[Repository]") REQUIRE(stats.size() != 0); for(const auto& elm: stats) { - if (gul14::starts_with(elm.path_name, "unit_test_1/file0")) + if (gul17::starts_with(elm.path_name, "unit_test_1/file0")) { REQUIRE(elm.handling == "unstaged"); REQUIRE(elm.changes == "modified"); } - else if (gul14::starts_with(elm.path_name, "unit_test_1/file1")) + else if (gul17::starts_with(elm.path_name, "unit_test_1/file1")) { REQUIRE(elm.handling == "staged"); REQUIRE(elm.changes == "modified"); } - else if (gul14::starts_with(elm.path_name, "unit_test_2/file")) + else if (gul17::starts_with(elm.path_name, "unit_test_2/file")) { REQUIRE(elm.handling == "unchanged"); REQUIRE(elm.changes == "unchanged"); @@ -274,7 +276,7 @@ TEST_CASE("Repository Wrapper Test all", "[Repository]") REQUIRE(stats.size() != 0); for(const auto& elm: stats) { - if (gul14::starts_with(elm.path_name, "unit_test_2/file1.txt")) + if (gul17::starts_with(elm.path_name, "unit_test_2/file1.txt")) { REQUIRE(elm.handling == "staged"); REQUIRE(elm.changes == "deleted"); @@ -294,7 +296,7 @@ TEST_CASE("Repository Wrapper Test all", "[Repository]") std::stringstream ss{ }; ss << gl.status(); - REQUIRE(gul14::trim(ss.str()) == "RepoState {\n" \ + REQUIRE(gul17::trim(ss.str()) == "RepoState {\n" \ "FileStatus{ \"unit_test_1/file0.txt\": unstaged; modified }\n" \ "FileStatus{ \"unit_test_1/file1.txt\": unchanged; unchanged }\n" \ "FileStatus{ \"unit_test_2/file0.txt\": unchanged; unchanged }\n" \ @@ -304,7 +306,7 @@ TEST_CASE("Repository Wrapper Test all", "[Repository]") ss.str(""); ss << gl.status(); - REQUIRE(gul14::trim(ss.str()) == "RepoState {\n" \ + REQUIRE(gul17::trim(ss.str()) == "RepoState {\n" \ "FileStatus{ \"unit_test_1/file0.txt\": unchanged; unchanged }\n" \ "FileStatus{ \"unit_test_1/file1.txt\": unchanged; unchanged }\n" \ "FileStatus{ \"unit_test_2/file0.txt\": unchanged; unchanged }\n" \ @@ -314,7 +316,7 @@ TEST_CASE("Repository Wrapper Test all", "[Repository]") ss.str(""); ss << gl.status(); - REQUIRE(gul14::trim(ss.str()) == "RepoState {\n" \ + REQUIRE(gul17::trim(ss.str()) == "RepoState {\n" \ "FileStatus{ \"unit_test_1/file0.txt\": unchanged; unchanged }\n" \ "FileStatus{ \"unit_test_1/file1.txt\": unchanged; unchanged }\n" \ "FileStatus{ \"unit_test_2/file0.txt\": unchanged; unchanged }\n" \ @@ -348,7 +350,7 @@ TEST_CASE("Repository Wrapper Test all", "[Repository]") REQUIRE(stats.size() != 0); for(const auto& elm: stats) { - if (gul14::starts_with(elm.path_name, "unit_test_2")) + if (gul17::starts_with(elm.path_name, "unit_test_2")) { REQUIRE(elm.handling == "staged"); REQUIRE(elm.changes == "deleted"); @@ -363,7 +365,7 @@ TEST_CASE("Repository Wrapper Test all", "[Repository]") REQUIRE(stats.size() != 0); for(const auto& elm: stats) { - if (gul14::starts_with(elm.path_name, "unit_test_2/file")) + if (gul17::starts_with(elm.path_name, "unit_test_2/file")) REQUIRE (elm.changes == "untracked"); } @@ -375,7 +377,7 @@ TEST_CASE("Repository Wrapper Test all", "[Repository]") Repository gl{ reporoot }; auto ss = std::stringstream{ }; ss << gl.status(); - REQUIRE(gul14::trim(ss.str()) == "RepoState {\n" \ + REQUIRE(gul17::trim(ss.str()) == "RepoState {\n" \ "FileStatus{ \"unit_test_1/file0.txt\": unchanged; unchanged }\n" \ "FileStatus{ \"unit_test_1/file1.txt\": unchanged; unchanged }\n" \ "FileStatus{ \"unit_test_2/file0.txt\": untracked; untracked }\n" \ @@ -386,7 +388,7 @@ TEST_CASE("Repository Wrapper Test all", "[Repository]") ss.str(""); ss << gl.status(); - REQUIRE(gul14::trim(ss.str()) == "RepoState {\n" \ + REQUIRE(gul17::trim(ss.str()) == "RepoState {\n" \ "FileStatus{ \"unit_test_1/file0.txt\": unchanged; unchanged }\n" \ "FileStatus{ \"unit_test_1/file1.txt\": unchanged; unchanged }\n" \ "FileStatus{ \"unit_test_2/file0.txt\": untracked; untracked }\n" \ @@ -452,7 +454,7 @@ TEST_CASE("Repository add() with glob", "[Repository]") stats.erase(new_end, stats.end()); std::stringstream ss{ }; ss << stats; - INFO(gul14::trim(ss.str())); + INFO(gul17::trim(ss.str())); REQUIRE(stats.size() == 0); } SECTION("Star glob on files 2") @@ -470,7 +472,7 @@ TEST_CASE("Repository add() with glob", "[Repository]") stats.erase(new_end, stats.end()); std::stringstream ss{ }; ss << stats; - INFO(gul14::trim(ss.str())); + INFO(gul17::trim(ss.str())); REQUIRE(stats.size() == 5); } SECTION("Star glob on directories 1") @@ -489,7 +491,7 @@ TEST_CASE("Repository add() with glob", "[Repository]") stats.erase(new_end, stats.end()); std::stringstream ss{ }; ss << stats; - INFO(gul14::trim(ss.str())); + INFO(gul17::trim(ss.str())); REQUIRE(stats.size() == 3); } SECTION("Star glob on directories 2") @@ -506,7 +508,7 @@ TEST_CASE("Repository add() with glob", "[Repository]") stats.erase(new_end, stats.end()); std::stringstream ss{ }; ss << stats; - INFO(gul14::trim(ss.str())); + INFO(gul17::trim(ss.str())); REQUIRE(stats.size() == 1); } SECTION("Questionmark glob") @@ -521,7 +523,7 @@ TEST_CASE("Repository add() with glob", "[Repository]") stats.erase(new_end, stats.end()); std::stringstream ss{ }; ss << stats; - INFO(gul14::trim(ss.str())); + INFO(gul17::trim(ss.str())); REQUIRE(stats.size() == 2); } SECTION("Selection glob simple") @@ -543,7 +545,7 @@ TEST_CASE("Repository add() with glob", "[Repository]") stats.erase(new_end, stats.end()); std::stringstream ss{ }; ss << stats; - INFO(gul14::trim(ss.str())); + INFO(gul17::trim(ss.str())); REQUIRE(stats.size() == 7); } SECTION("Selection glob range") @@ -562,7 +564,7 @@ TEST_CASE("Repository add() with glob", "[Repository]") stats.erase(new_end, stats.end()); std::stringstream ss{ }; ss << stats; - INFO(gul14::trim(ss.str())); + INFO(gul17::trim(ss.str())); REQUIRE(stats.size() == 6); } SECTION("Hidden files need extra globs") @@ -576,7 +578,7 @@ TEST_CASE("Repository add() with glob", "[Repository]") stats.erase(new_end, stats.end()); std::stringstream ss{ }; ss << stats; - INFO(gul14::trim(ss.str())); + INFO(gul17::trim(ss.str())); REQUIRE(stats.size() == 1); } } @@ -792,8 +794,8 @@ TEST_CASE("Repository: partially checkout other branch", "[Repository]") // check file status before auto ss = std::stringstream{ }; ss << repo.status(); - auto est = gul14::trim(ss.str()); - REQUIRE(gul14::trim(ss.str()) == "RepoState {\n" \ + auto est = gul17::trim(ss.str()); + REQUIRE(gul17::trim(ss.str()) == "RepoState {\n" \ "FileStatus{ \"partial_checkout_test/file0.txt\": unchanged; unchanged }\n" \ "FileStatus{ \"partial_checkout_test/file1.txt\": unchanged; unchanged }\n" \ "}"); @@ -802,8 +804,8 @@ TEST_CASE("Repository: partially checkout other branch", "[Repository]") repo.checkout("new_branch", {"*"}); ss.str(""); ss << repo.status(); - est = gul14::trim(ss.str()); - REQUIRE(gul14::trim(ss.str()) == "RepoState {\n" \ + est = gul17::trim(ss.str()); + REQUIRE(gul17::trim(ss.str()) == "RepoState {\n" \ "FileStatus{ \"partial_checkout_test/file0.txt\": unchanged; unchanged }\n" \ "FileStatus{ \"partial_checkout_test/file1.txt\": staged; modified }\n" \ "FileStatus{ \"partial_checkout_test/file2.txt\": staged; new file }\n" \ @@ -816,8 +818,8 @@ TEST_CASE("Repository: partially checkout other branch", "[Repository]") repo.checkout("new_branch", {"*file3*"}); ss.str(""); ss << repo.status(); - est = gul14::trim(ss.str()); - REQUIRE(gul14::trim(ss.str()) == "RepoState {\n" \ + est = gul17::trim(ss.str()); + REQUIRE(gul17::trim(ss.str()) == "RepoState {\n" \ "FileStatus{ \"partial_checkout_test/file0.txt\": unchanged; unchanged }\n" \ "FileStatus{ \"partial_checkout_test/file1.txt\": unchanged; unchanged }\n" \ "FileStatus{ \"partial_checkout_test/file3.txt\": staged; new file }\n" \ @@ -829,8 +831,8 @@ TEST_CASE("Repository: partially checkout other branch", "[Repository]") repo.checkout("new_branch", {"*file1*", "*file2*"}); ss.str(""); ss << repo.status(); - est = gul14::trim(ss.str()); - REQUIRE(gul14::trim(ss.str()) == "RepoState {\n" \ + est = gul17::trim(ss.str()); + REQUIRE(gul17::trim(ss.str()) == "RepoState {\n" \ "FileStatus{ \"partial_checkout_test/file0.txt\": unchanged; unchanged }\n" \ "FileStatus{ \"partial_checkout_test/file1.txt\": staged; modified }\n" \ "FileStatus{ \"partial_checkout_test/file2.txt\": staged; new file }\n" \ @@ -884,7 +886,7 @@ TEST_CASE("Repository Wrapper Test Remote", "[GitWrapper]") REQUIRE(stats.size() != 0); for(const auto& elm: stats) { - if (gul14::starts_with(elm.path_name, "unit_test_1")) + if (gul17::starts_with(elm.path_name, "unit_test_1")) { REQUIRE(elm.handling == "unchanged"); REQUIRE(elm.changes == "unchanged");