From a8792e00b35fad5e2988ceca1fe4dc984d6795e7 Mon Sep 17 00:00:00 2001 From: Ilya Grigoriev Date: Sun, 24 Nov 2024 15:52:01 -0800 Subject: [PATCH] cli `util gc`: document the fact that evolution log limits gc This is a followup to the discussion in https://github.com/martinvonz/jj/pull/4953#discussion_r1855328098 --- cli/src/commands/util/gc.rs | 3 +++ cli/tests/cli-reference@.md.snap | 2 ++ 2 files changed, 5 insertions(+) diff --git a/cli/src/commands/util/gc.rs b/cli/src/commands/util/gc.rs index eef16ce00a..9cf5d8aaea 100644 --- a/cli/src/commands/util/gc.rs +++ b/cli/src/commands/util/gc.rs @@ -27,6 +27,9 @@ use crate::ui::Ui; /// /// To garbage-collect old operations and the commits/objects referenced by /// then, run `jj op abandon ..` before `jj util gc`. +/// +/// Note that previous versions of a change that are reachable via the evolution +/// log are not currently garbage-collected. #[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 d89f433728..ba7c5e7411 100644 --- a/cli/tests/cli-reference@.md.snap +++ b/cli/tests/cli-reference@.md.snap @@ -2268,6 +2268,8 @@ 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`. +At present, jj's garbage collection is not comprehensive. If a commit is preserved by the garbage collection, objects reachable from its evolution log cannot be garbage collected. + **Usage:** `jj util gc [OPTIONS]` ###### **Options:**