diff options
| author | ItsDrike <itsdrike@protonmail.com> | 2024-03-06 13:01:04 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-06 12:01:04 +0000 |
| commit | 082bf002546cfa7aaa7c5b79b03a1b6dd95454af (patch) | |
| tree | 68a726fcf45e1901a24821d6fcc6386b15c01f48 /hyprpm/src/core/DataState.cpp | |
| parent | d6f1b151b2fe85ffbb131cbdd05acefc6a357e81 (diff) | |
hyprpm: Add support for specifying exact git revisions for plugin repo (#4983)
* hyprpm(feat): support specifying exact git revs
* Mention git rev argument in help
* Mention git rev arg is optional
* Wrap text
Diffstat (limited to 'hyprpm/src/core/DataState.cpp')
| -rw-r--r-- | hyprpm/src/core/DataState.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hyprpm/src/core/DataState.cpp b/hyprpm/src/core/DataState.cpp index a7f9a7ae..61ad336f 100644 --- a/hyprpm/src/core/DataState.cpp +++ b/hyprpm/src/core/DataState.cpp @@ -45,7 +45,8 @@ void DataState::addNewPluginRepo(const SPluginRepository& repo) { {"repository", toml::table{ {"name", repo.name}, {"hash", repo.hash}, - {"url", repo.url} + {"url", repo.url}, + {"rev", repo.rev} }} }; for (auto& p : repo.plugins) { @@ -178,12 +179,14 @@ std::vector<SPluginRepository> DataState::getAllRepositories() { const auto NAME = STATE["repository"]["name"].value_or(""); const auto URL = STATE["repository"]["url"].value_or(""); + const auto REV = STATE["repository"]["rev"].value_or(""); const auto HASH = STATE["repository"]["hash"].value_or(""); SPluginRepository repo; repo.hash = HASH; repo.name = NAME; repo.url = URL; + repo.rev = REV; for (const auto& [key, val] : STATE) { if (key == "repository") |
