Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Clarify remove command help text
Maximilian Roos143ec2a4977d
diff --git a/docs/content/remove.md b/docs/content/remove.mdindex 11f9569c7..16d3261a3 100644--- a/docs/content/remove.md+++ b/docs/content/remove.md@@ -8,7 +8,7 @@ group = "Commands"<!-- ⚠️ AUTO-GENERATED from `wt remove --help-page` — edit cli.rs to update -->-Removes worktrees and their branches. Without arguments, removes the current worktree and returns to the main worktree.+Removes worktrees and their branches (if merged), returning to the main worktree. Defaults to removing the current worktree.## Examples@@ -39,7 +39,7 @@ wt remove -D experimental## Branch cleanup-Branches delete automatically when merging them would add nothing. This works with squash-merge and rebase workflows where commit history differs but file changes match.+By default, branches are deleted when merging them would add nothing. This works with squash-merge and rebase workflows where commit history differs but file changes match.Worktrunk checks five conditions (in order of cost):@@ -71,7 +71,7 @@ Removal runs in the background by default (returns immediately). Logs are writte## Command reference{% terminal() %}-wt remove - Remove worktree and branch+wt remove - Remove worktree and branch (if merged)Usage: <b><span class=c>wt remove</span></b> <span class=c>[OPTIONS]</span> <span class=c>[BRANCHES]...</span>diff --git a/src/cli.rs b/src/cli.rsindex f8f8cd9f1..88fb98266 100644--- a/src/cli.rs+++ b/src/cli.rs@@ -2390,9 +2390,9 @@ To change which branch a worktree is on, use `git switch` inside that worktree.verify: bool,},- /// Remove worktree and branch+ /// Remove worktree and branch (if merged)#[command(- after_long_help = r#"Removes worktrees and their branches. Without arguments, removes the current worktree and returns to the main worktree.+ after_long_help = r#"Removes worktrees and their branches (if merged), returning to the main worktree. Defaults to removing the current worktree.## Examples@@ -2423,7 +2423,7 @@ wt remove -D experimental## Branch cleanup-Branches delete automatically when merging them would add nothing. This works with squash-merge and rebase workflows where commit history differs but file changes match.+By default, branches are deleted when merging them would add nothing. This works with squash-merge and rebase workflows where commit history differs but file changes match.Worktrunk checks five conditions (in order of cost):diff --git a/tests/snapshots/integration__integration_tests__help__help_md_root.snap b/tests/snapshots/integration__integration_tests__help__help_md_root.snapindex b15bf14fa..86db0d108 100644--- a/tests/snapshots/integration__integration_tests__help__help_md_root.snap+++ b/tests/snapshots/integration__integration_tests__help__help_md_root.snap@@ -11,6 +11,7 @@ info:RUST_LOG: warnSOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"---success: trueexit_code: 0@@ -26,7 +27,7 @@ Commands:select Interactive worktree selectorlist List worktrees and optionally branchesswitch Switch to a worktree- remove Remove worktree and branch+ remove Remove worktree and branch (if merged)merge Merge worktree into target branchOptions:diff --git a/tests/snapshots/integration__integration_tests__help__help_no_args.snap b/tests/snapshots/integration__integration_tests__help__help_no_args.snapindex 48f5491bd..a099a5ead 100644--- a/tests/snapshots/integration__integration_tests__help__help_no_args.snap+++ b/tests/snapshots/integration__integration_tests__help__help_no_args.snap@@ -7,8 +7,10 @@ info:CLICOLOR_FORCE: "1"COLUMNS: "150"GIT_EDITOR: ""+ RUST_LOG: warnSOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"---success: trueexit_code: 0@@ -26,7 +28,7 @@ Usage: [1m[36mwt[0m [36m[OPTIONS][0m [36m[COMMAND][1m[36mselect[0m Interactive worktree selector[1m[36mlist[0m List worktrees and optionally branches[1m[36mswitch[0m Switch to a worktree- [1m[36mremove[0m Remove worktree and branch+ [1m[36mremove[0m Remove worktree and branch (if merged)[1m[36mmerge[0m Merge worktree into target branch[1m[32mOptions:diff --git a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap b/tests/snapshots/integration__integration_tests__help__help_remove_long.snapindex c1c06ea8f..26ce79637 100644--- a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_remove_long.snap@@ -12,13 +12,14 @@ info:RUST_LOG: warnSOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"---success: trueexit_code: 0----- stdout ---------- stderr ------wt remove - Remove worktree and branch+wt remove - Remove worktree and branch (if merged)Usage: [1m[36mwt remove[0m [36m[OPTIONS][0m [36m[BRANCHES]...@@ -60,7 +61,7 @@ Usage: [1m[36mwt remove[0m [36m[OPTIONS][0m [36m[BRANCHES]...[1m[36m-v[0m, [1m[36m--verboseShow commands and debug info-Removes worktrees and their branches. Without arguments, removes the current worktree and returns to the main worktree.+Removes worktrees and their branches (if merged), returning to the main worktree. Defaults to removing the current worktree.[32mExamples@@ -83,8 +84,8 @@ Force-delete an unmerged branch:[32mBranch cleanup-Branches delete automatically when merging them would add nothing. This works with squash-merge and rebase workflows where commit history differs but-file changes match.+By default, branches are deleted when merging them would add nothing. This works with squash-merge and rebase workflows where commit history differs+but file changes match.Worktrunk checks five conditions (in order of cost):diff --git a/tests/snapshots/integration__integration_tests__help__help_remove_short.snap b/tests/snapshots/integration__integration_tests__help__help_remove_short.snapindex 5a4002023..ca10b2765 100644--- a/tests/snapshots/integration__integration_tests__help__help_remove_short.snap+++ b/tests/snapshots/integration__integration_tests__help__help_remove_short.snap@@ -12,13 +12,14 @@ info:RUST_LOG: warnSOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"---success: trueexit_code: 0----- stdout ---------- stderr ------wt remove - Remove worktree and branch+wt remove - Remove worktree and branch (if merged)Usage: [1m[36mwt remove[0m [36m[OPTIONS][0m [36m[BRANCHES]...diff --git a/tests/snapshots/integration__integration_tests__help__help_root_long.snap b/tests/snapshots/integration__integration_tests__help__help_root_long.snapindex 019a158e7..cc853e12e 100644--- a/tests/snapshots/integration__integration_tests__help__help_root_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_root_long.snap@@ -11,6 +11,7 @@ info:RUST_LOG: warnSOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"---success: trueexit_code: 0@@ -28,7 +29,7 @@ Usage: [1m[36mwt[0m [36m[OPTIONS][0m [36m[COMMAND][1m[36mselect[0m Interactive worktree selector[1m[36mlist[0m List worktrees and optionally branches[1m[36mswitch[0m Switch to a worktree- [1m[36mremove[0m Remove worktree and branch+ [1m[36mremove[0m Remove worktree and branch (if merged)[1m[36mmerge[0m Merge worktree into target branch[1m[32mOptions:diff --git a/tests/snapshots/integration__integration_tests__help__help_root_short.snap b/tests/snapshots/integration__integration_tests__help__help_root_short.snapindex 6728dff01..9134845b5 100644--- a/tests/snapshots/integration__integration_tests__help__help_root_short.snap+++ b/tests/snapshots/integration__integration_tests__help__help_root_short.snap@@ -8,8 +8,10 @@ info:CLICOLOR_FORCE: "1"COLUMNS: "150"GIT_EDITOR: ""+ RUST_LOG: warnSOURCE_DATE_EPOCH: "1735776000"WORKTRUNK_CONFIG_PATH: /nonexistent/test/config.toml+ WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"---success: trueexit_code: 0@@ -27,7 +29,7 @@ Usage: [1m[36mwt[0m [36m[OPTIONS][0m [36m[COMMAND][1m[36mselect[0m Interactive worktree selector[1m[36mlist[0m List worktrees and optionally branches[1m[36mswitch[0m Switch to a worktree- [1m[36mremove[0m Remove worktree and branch+ [1m[36mremove[0m Remove worktree and branch (if merged)[1m[36mmerge[0m Merge worktree into target branch[1m[32mOptions: