Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

feat: `remove` now runs in background by default

Maximilian Roos0993a7a48459
diff --git a/src/cli.rs b/src/cli.rs
index 3aa9acd28..f943097aa 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -498,11 +498,13 @@ CLEANUP:
When removing a worktree (by default):
1. Validates worktree has no uncommitted changes
2. Changes directory (if removing current worktree)
- 3. Deletes worktree directory
- 4. Removes git worktree metadata
- 5. Deletes associated branch (uses git branch -d, safe delete)
- - If branch has unmerged commits, shows warning but continues
- - Use --no-delete-branch to skip branch deletion
+ 3. Spawns background removal process (non-blocking)
+ - Directory deletion happens in background
+ - Git worktree metadata removed in background
+ - Branch deletion in background (uses git branch -d, safe delete)
+ - Logs: .git/wt-logs/{branch}-remove.log
+ 4. Returns immediately so you can continue working
+ - Use --no-background for foreground removal (blocking)
EXAMPLES:
@@ -518,6 +520,9 @@ Remove worktree but keep branch:
Remove multiple worktrees:
wt remove old-feature another-branch
+Remove in foreground (blocking):
+ wt remove --no-background feature-branch
+
Switch to default in primary:
wt remove # (when already in primary worktree)"#)]
Remove {
@@ -529,9 +534,9 @@ Switch to default in primary:
#[arg(long = "no-delete-branch")]
no_delete_branch: bool,
- /// Run removal in background
- #[arg(long)]
- background: bool,
+ /// Run removal in foreground
+ #[arg(long = "no-background")]
+ no_background: bool,
},
/// Merge worktree into target branch
diff --git a/src/main.rs b/src/main.rs
index ed3507cfd..da5748077 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -264,8 +264,9 @@ fn main() {
Commands::Remove {
worktrees,
no_delete_branch,
- background,
+ no_background,
} => (|| -> Result<(), GitError> {
+ let background = !no_background;
let repo = Repository::current();
if worktrees.is_empty() {
diff --git a/tests/integration_tests/bare_repository.rs b/tests/integration_tests/bare_repository.rs
index eace48748..839304e39 100644
--- a/tests/integration_tests/bare_repository.rs
+++ b/tests/integration_tests/bare_repository.rs
@@ -322,7 +322,7 @@ fn test_bare_repo_remove_worktree() {
// Remove feature worktree from main worktree
let mut cmd = wt_command();
test.configure_wt_cmd(&mut cmd);
- cmd.args(["remove", "feature", "--internal"])
+ cmd.args(["remove", "feature", "--no-background", "--internal"])
.current_dir(&main_worktree);
let output = cmd.output().expect("Failed to run wt remove");
@@ -574,7 +574,7 @@ fn test_bare_repo_background_logs_location() {
// Run remove in background to test log file location
let mut cmd = wt_command();
test.configure_wt_cmd(&mut cmd);
- cmd.args(["remove", "feature", "--background", "--internal"])
+ cmd.args(["remove", "feature", "--internal"])
.current_dir(&main_worktree);
let output = cmd.output().expect("Failed to run wt remove");
diff --git a/tests/integration_tests/directives.rs b/tests/integration_tests/directives.rs
index fa683e6df..046de03a8 100644
--- a/tests/integration_tests/directives.rs
+++ b/tests/integration_tests/directives.rs
@@ -89,7 +89,6 @@ fn test_remove_internal_directive() {
----- stdout -----
----- stderr -----
- πŸ”„ Removing worktree for main...
❌ Cannot remove main worktree
πŸ’‘ Use 'wt remove' from a secondary worktree, or 'wt switch' to change branches
@@ -115,7 +114,6 @@ fn test_remove_without_internal() {
success: false
exit_code: 1
----- stdout -----
- πŸ”„ Removing worktree for main...
❌ Cannot remove main worktree
πŸ’‘ Use 'wt remove' from a secondary worktree, or 'wt switch' to change branches
diff --git a/tests/integration_tests/remove.rs b/tests/integration_tests/remove.rs
index 814eaf6b5..11275c38c 100644
--- a/tests/integration_tests/remove.rs
+++ b/tests/integration_tests/remove.rs
@@ -243,19 +243,19 @@ fn test_remove_branch_not_fully_merged() {
}
#[test]
-fn test_remove_background() {
+fn test_remove_foreground() {
let mut repo = TestRepo::new();
repo.commit("Initial commit");
repo.setup_remote("main");
// Create a worktree
- let _worktree_path = repo.add_worktree("feature-bg", "feature-bg");
+ let _worktree_path = repo.add_worktree("feature-fg", "feature-fg");
- // Remove it with --background flag from main repo
+ // Remove it with --no-background flag from main repo
snapshot_remove(
- "remove_background",
+ "remove_foreground",
&repo,
- &["--background", "feature-bg"],
+ &["--no-background", "feature-fg"],
None,
);
}
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__remove.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__remove.snap
index 4f81c4f6c..b659c4230 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__remove.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__remove.snap
@@ -2,5 +2,4 @@
source: tests/integration_tests/shell_wrapper.rs
expression: output.normalized()
---
-πŸ”„ Removing worktree for to-remove...
-βœ… Removed worktree & branch for to-remove
+πŸ”„ Removing to-remove in background
diff --git a/tests/snapshots/integration__integration_tests__init__init_bash.snap b/tests/snapshots/integration__integration_tests__init__init_bash.snap
index d4f4d886e..9ae5f20b1 100644
--- a/tests/snapshots/integration__integration_tests__init__init_bash.snap
+++ b/tests/snapshots/integration__integration_tests__init__init_bash.snap
@@ -16,7 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpYAlSYi/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp9vlu3M/test-config.toml
---
success: true
exit_code: 0
@@ -628,7 +628,7 @@ _wt() {
return 0
;;
wt__remove)
- opts="-C -v -h --no-delete-branch --background --verbose --help [WORKTREES]..."
+ opts="-C -v -h --no-delete-branch --no-background --verbose --help [WORKTREES]..."
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
diff --git a/tests/snapshots/integration__integration_tests__init__init_fish.snap b/tests/snapshots/integration__integration_tests__init__init_fish.snap
index f1638b77d..62521c405 100644
--- a/tests/snapshots/integration__integration_tests__init__init_fish.snap
+++ b/tests/snapshots/integration__integration_tests__init__init_fish.snap
@@ -16,7 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp203cHd/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpzQbSvH/test-config.toml
---
success: true
exit_code: 0
@@ -289,7 +289,7 @@ complete -c wt -n "__fish_wt_using_subcommand switch" -s v -l verbose -d 'Show g
complete -c wt -n "__fish_wt_using_subcommand switch" -s h -l help -d 'Print help'
complete -c wt -n "__fish_wt_using_subcommand remove" -s C -d 'Change working directory' -r -F
complete -c wt -n "__fish_wt_using_subcommand remove" -l no-delete-branch -d 'Keep branch after removal'
-complete -c wt -n "__fish_wt_using_subcommand remove" -l background -d 'Run removal in background'
+complete -c wt -n "__fish_wt_using_subcommand remove" -l no-background -d 'Run removal in foreground'
complete -c wt -n "__fish_wt_using_subcommand remove" -s v -l verbose -d 'Show git commands and debug info'
complete -c wt -n "__fish_wt_using_subcommand remove" -s h -l help -d 'Print help'
complete -c wt -n "__fish_wt_using_subcommand merge" -s C -d 'Change working directory' -r -F
diff --git a/tests/snapshots/integration__integration_tests__init__init_zsh.snap b/tests/snapshots/integration__integration_tests__init__init_zsh.snap
index dcffab44c..962c2bf63 100644
--- a/tests/snapshots/integration__integration_tests__init__init_zsh.snap
+++ b/tests/snapshots/integration__integration_tests__init__init_zsh.snap
@@ -16,7 +16,7 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp81uBPc/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpnjIQTI/test-config.toml
---
success: true
exit_code: 0
@@ -435,7 +435,7 @@ _arguments "${_arguments_options[@]}" : \
_arguments "${_arguments_options[@]}" : \
'-C+[Change working directory]:path:_files' \
'--no-delete-branch[Keep branch after removal]' \
-'--background[Run removal in background]' \
+'--no-background[Run removal in foreground]' \
'-v[Show git commands and debug info]' \
'--verbose[Show git commands and debug info]' \
'-h[Print help]' \
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_already_on_default.snap b/tests/snapshots/integration__integration_tests__remove__remove_already_on_default.snap
index 7ff0033a0..8b7ea87b1 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_already_on_default.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_already_on_default.snap
@@ -15,12 +15,11 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmptLKJdP/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpANO5Mz/test-config.toml
---
success: false
exit_code: 1
----- stdout -----
-πŸ”„ Removing worktree for main...
❌ Cannot remove main worktree
πŸ’‘ Use 'wt remove' from a secondary worktree, or 'wt switch' to change branches
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_branch_not_fully_merged.snap b/tests/snapshots/integration__integration_tests__remove__remove_branch_not_fully_merged.snap
index 0789d6ffa..fabca61ce 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_branch_not_fully_merged.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_branch_not_fully_merged.snap
@@ -16,14 +16,11 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp7TLzj2/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpBVXg8X/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-πŸ”„ Removing worktree for feature-unmerged...
-🟑 Could not delete branch feature-unmerged
-  error: the branch 'feature-unmerged' is not fully merged
-βœ… Removed worktree for feature-unmerged
+πŸ”„ Removing feature-unmerged in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_by_name_dirty_target.snap b/tests/snapshots/integration__integration_tests__remove__remove_by_name_dirty_target.snap
index dfb1a3d12..bbebc2efd 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_by_name_dirty_target.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_by_name_dirty_target.snap
@@ -16,12 +16,11 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpY6EoeS/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpcVVLTp/test-config.toml
---
success: false
exit_code: 1
----- stdout -----
-πŸ”„ Removing worktree for feature-dirty...
❌ Working tree has uncommitted changes
πŸ’‘ Commit or stash them first
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_by_name_from_main.snap b/tests/snapshots/integration__integration_tests__remove__remove_by_name_from_main.snap
index 1bb2bf459..b06950ba0 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_by_name_from_main.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_by_name_from_main.snap
@@ -16,12 +16,11 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpTuzduq/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpikdoOB/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-πŸ”„ Removing worktree for feature-a...
-βœ… Removed worktree & branch for feature-a
+πŸ”„ Removing feature-a in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_by_name_from_other_worktree.snap b/tests/snapshots/integration__integration_tests__remove__remove_by_name_from_other_worktree.snap
index b12270f9a..51515b3ba 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_by_name_from_other_worktree.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_by_name_from_other_worktree.snap
@@ -16,12 +16,11 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpejfp89/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpSaCcYh/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-πŸ”„ Removing worktree for feature-b...
-βœ… Removed worktree & branch for feature-b
+πŸ”„ Removing feature-b in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_current_by_name.snap b/tests/snapshots/integration__integration_tests__remove__remove_current_by_name.snap
index 3adbadb53..3358520e7 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_current_by_name.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_current_by_name.snap
@@ -16,12 +16,11 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpeD1SRN/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpIA71vF/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-πŸ”„ Removing worktree for feature-current...
-βœ… Removed worktree & branch for feature-current, changed directory to [REPO]
+πŸ”„ Removing feature-current in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_dirty_working_tree.snap b/tests/snapshots/integration__integration_tests__remove__remove_dirty_working_tree.snap
index 524f832e8..91a53b75e 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_dirty_working_tree.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_dirty_working_tree.snap
@@ -15,12 +15,11 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpIwpGmf/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp1TmXGy/test-config.toml
---
success: false
exit_code: 1
----- stdout -----
-πŸ”„ Removing worktree for main...
❌ Working tree has uncommitted changes
πŸ’‘ Commit or stash them first
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_foreground.snap b/tests/snapshots/integration__integration_tests__remove__remove_foreground.snap
new file mode 100644
index 000000000..5a74130ad
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__remove__remove_foreground.snap
@@ -0,0 +1,28 @@
+---
+source: tests/integration_tests/remove.rs
+info:
+ program: wt
+ args:
+ - remove
+ - "--no-background"
+ - feature-fg
+ env:
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "150"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
+ LANG: C
+ LC_ALL: C
+ SOURCE_DATE_EPOCH: "1761609600"
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpQAlfFS/test-config.toml
+---
+success: true
+exit_code: 0
+----- stdout -----
+πŸ”„ Removing worktree for feature-fg...
+βœ… Removed worktree & branch for feature-fg
+
+----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_from_worktree.snap b/tests/snapshots/integration__integration_tests__remove__remove_from_worktree.snap
index c370cd339..65d237e6f 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_from_worktree.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_from_worktree.snap
@@ -15,12 +15,11 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmprbP5WE/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpscKTqw/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-πŸ”„ Removing worktree for feature-wt...
-βœ… Removed worktree & branch for feature-wt, changed directory to [REPO]
+πŸ”„ Removing feature-wt in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_internal_mode.snap b/tests/snapshots/integration__integration_tests__remove__remove_internal_mode.snap
index 8717bc8ea..9b9c8f883 100644
Binary files a/tests/snapshots/integration__integration_tests__remove__remove_internal_mode.snap and b/tests/snapshots/integration__integration_tests__remove__remove_internal_mode.snap differ
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_multiple_including_current.snap b/tests/snapshots/integration__integration_tests__remove__remove_multiple_including_current.snap
index ef432897b..f0673802b 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_multiple_including_current.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_multiple_including_current.snap
@@ -18,16 +18,13 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpB8muTV/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpO7W9xY/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-πŸ”„ Removing worktree for feature-b...
-βœ… Removed worktree & branch for feature-b
-πŸ”„ Removing worktree for feature-c...
-βœ… Removed worktree & branch for feature-c
-πŸ”„ Removing worktree for feature-a...
-βœ… Removed worktree & branch for feature-a, changed directory to [REPO]
+πŸ”„ Removing feature-b in background
+πŸ”„ Removing feature-c in background
+πŸ”„ Removing feature-a in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_multiple_worktrees.snap b/tests/snapshots/integration__integration_tests__remove__remove_multiple_worktrees.snap
index 5fcb4fdfb..a8f8b7f72 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_multiple_worktrees.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_multiple_worktrees.snap
@@ -18,16 +18,13 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpoz3HcP/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpCjU6VT/test-config.toml
---
success: true
exit_code: 0
----- stdout -----
-πŸ”„ Removing worktree for feature-a...
-βœ… Removed worktree & branch for feature-a
-πŸ”„ Removing worktree for feature-b...
-βœ… Removed worktree & branch for feature-b
-πŸ”„ Removing worktree for feature-c...
-βœ… Removed worktree & branch for feature-c
+πŸ”„ Removing feature-a in background
+πŸ”„ Removing feature-b in background
+πŸ”„ Removing feature-c in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_nonexistent_worktree.snap b/tests/snapshots/integration__integration_tests__remove__remove_nonexistent_worktree.snap
index 2618ed88a..08cdeb89c 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_nonexistent_worktree.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_nonexistent_worktree.snap
@@ -16,12 +16,11 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp98HYOs/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpRjhhCS/test-config.toml
---
success: false
exit_code: 1
----- stdout -----
-πŸ”„ Removing worktree for nonexistent...
❌ No worktree found for branch nonexistent
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_switch_to_default.snap b/tests/snapshots/integration__integration_tests__remove__remove_switch_to_default.snap
index 5421bd38f..48ba8285f 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_switch_to_default.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_switch_to_default.snap
@@ -15,12 +15,11 @@ info:
LANG: C
LC_ALL: C
SOURCE_DATE_EPOCH: "1761609600"
- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpUF8Ywg/test-config.toml
+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpaRDNUu/test-config.toml
---
success: false
exit_code: 1
----- stdout -----
-πŸ”„ Removing worktree for feature...
❌ Cannot remove main worktree
πŸ’‘ Use 'wt remove' from a secondary worktree, or 'wt switch' to change branches