From 232ff86bfa7572487c6091176d1c9956c504673a Mon Sep 17 00:00:00 2001 From: Ilya Grigoriev Date: Fri, 22 Nov 2024 20:07:58 -0800 Subject: [PATCH] cli `util gc`: document the fact that it does not abandon operations This UI will probably change eventually, but let's document it for now. --- cli/src/commands/util/gc.rs | 3 +++ cli/tests/cli-reference@.md.snap | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cli/src/commands/util/gc.rs b/cli/src/commands/util/gc.rs index 4903356bcb..eef16ce00a 100644 --- a/cli/src/commands/util/gc.rs +++ b/cli/src/commands/util/gc.rs @@ -24,6 +24,9 @@ use crate::command_error::CommandError; use crate::ui::Ui; /// Run backend-dependent garbage collection. +/// +/// To garbage-collect old operations and the commits/objects referenced by +/// then, run `jj op abandon ..` before `jj util gc`. #[derive(clap::Args, Clone, Debug)] pub struct UtilGcArgs { /// Time threshold diff --git a/cli/tests/cli-reference@.md.snap b/cli/tests/cli-reference@.md.snap index 65f7a86caa..997cda9a31 100644 --- a/cli/tests/cli-reference@.md.snap +++ b/cli/tests/cli-reference@.md.snap @@ -2264,7 +2264,9 @@ echo "args: $@" ## `jj util gc` -Run backend-dependent garbage collection +Run backend-dependent garbage collection. + +To garbage-collect old operations and the commits/objects referenced by then, run `jj op abandon ..` before `jj util gc`. **Usage:** `jj util gc [OPTIONS]`