summaryrefslogtreecommitdiff
path: root/src/buildtool/common/cli.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/common/cli.hpp')
-rw-r--r--src/buildtool/common/cli.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/buildtool/common/cli.hpp b/src/buildtool/common/cli.hpp
index 387092bc..5b8df960 100644
--- a/src/buildtool/common/cli.hpp
+++ b/src/buildtool/common/cli.hpp
@@ -180,6 +180,10 @@ struct ServeArguments {
std::vector<std::filesystem::path> repositories{};
};
+struct GcArguments {
+ bool no_rotate{};
+};
+
static inline auto SetupCommonArguments(
gsl::not_null<CLI::App*> const& app,
gsl::not_null<CommonArguments*> const& clargs) {
@@ -723,4 +727,12 @@ static inline void SetupRetryArguments(
"the resources that survived the outage. (Default: 60)");
}
+static inline void SetupGcArguments(gsl::not_null<CLI::App*> const& app,
+ gsl::not_null<GcArguments*> const& args) {
+ app->add_flag("--no-rotate",
+ args->no_rotate,
+ "Do not rotate cache generations, only clean up what can be "
+ "done without losing cache.");
+}
+
#endif // INCLUDED_SRC_BUILDTOOL_COMMON_CLI_HPP