Skip to content

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

refactor(output): downgrade 'no worktree' message to info (#887)

Maximilian Roos6692352cda64
diff --git a/src/output/handlers.rs b/src/output/handlers.rs
index 18b3d7674..7309f4b56 100644
--- a/src/output/handlers.rs
+++ b/src/output/handlers.rs
@@ -545,10 +545,10 @@ fn handle_branch_only_output(
))
);
} else {
- // No worktree at all - warn since user asked to remove something that doesn't exist
+ // No worktree at all, but branch exists - informational since branch removal will proceed
eprintln!(
"{}",
- warning_message(cformat!(
+ info_message(cformat!(
"No worktree found for branch <bold>{branch_name}</>"
))
);
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_branch_matching_tree_content.snap b/tests/snapshots/integration__integration_tests__remove__remove_branch_matching_tree_content.snap
index ddb39540a..960f443fc 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_branch_matching_tree_content.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_branch_matching_tree_content.snap
@@ -25,6 +25,7 @@ info:
TERM: alacritty
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
WT_TEST_DELAYED_STREAM_MS: "-1"
WT_TEST_EPOCH: "1735776000"
@@ -35,5 +36,5 @@ exit_code: 0
----- stdout -----
----- stderr -----
-▲ No worktree found for branch feature-squashed
+○ No worktree found for branch feature-squashed
✓ Removed branch feature-squashed (tree matches main, ⊂)
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_branch_no_worktree_path_occupied.snap b/tests/snapshots/integration__integration_tests__remove__remove_branch_no_worktree_path_occupied.snap
index a90b95c5c..18f75a4b1 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_branch_no_worktree_path_occupied.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_branch_no_worktree_path_occupied.snap
@@ -25,6 +25,7 @@ info:
TERM: alacritty
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
WT_TEST_DELAYED_STREAM_MS: "-1"
WT_TEST_EPOCH: "1735776000"
@@ -35,5 +36,5 @@ exit_code: 0
----- stdout -----
----- stderr -----
-▲ No worktree found for branch npm
+○ No worktree found for branch npm
✓ Removed branch npm (same commit as main, _)
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_branch_only_force_delete.snap b/tests/snapshots/integration__integration_tests__remove__remove_branch_only_force_delete.snap
index 846b92ca7..626eec8c8 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_branch_only_force_delete.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_branch_only_force_delete.snap
@@ -26,6 +26,7 @@ info:
TERM: alacritty
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
WT_TEST_DELAYED_STREAM_MS: "-1"
WT_TEST_EPOCH: "1735776000"
@@ -36,5 +37,5 @@ exit_code: 0
----- stdout -----
----- stderr -----
-▲ No worktree found for branch feature-force
+○ No worktree found for branch feature-force
✓ Removed branch feature-force (--force-delete)
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_branch_only_merged.snap b/tests/snapshots/integration__integration_tests__remove__remove_branch_only_merged.snap
index cf0cbe3e8..f45d042a6 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_branch_only_merged.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_branch_only_merged.snap
@@ -25,6 +25,7 @@ info:
TERM: alacritty
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
WT_TEST_DELAYED_STREAM_MS: "-1"
WT_TEST_EPOCH: "1735776000"
@@ -35,5 +36,5 @@ exit_code: 0
----- stdout -----
----- stderr -----
-▲ No worktree found for branch feature-merged
+○ No worktree found for branch feature-merged
✓ Removed branch feature-merged (same commit as main, _)
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_branch_only_unmerged.snap b/tests/snapshots/integration__integration_tests__remove__remove_branch_only_unmerged.snap
index 4280a3ea1..d8f8cdf1d 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_branch_only_unmerged.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_branch_only_unmerged.snap
@@ -25,6 +25,7 @@ info:
TERM: alacritty
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
WT_TEST_DELAYED_STREAM_MS: "-1"
WT_TEST_EPOCH: "1735776000"
@@ -35,6 +36,6 @@ exit_code: 0
----- stdout -----
----- stderr -----
-▲ No worktree found for branch feature-unmerged
+○ No worktree found for branch feature-unmerged
○ Branch feature-unmerged retained; has unmerged changes
↳ To delete the unmerged branch, run wt remove feature-unmerged -D
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_detached_worktree_in_multi.snap b/tests/snapshots/integration__integration_tests__remove__remove_detached_worktree_in_multi.snap
index 2fe494648..5112c9fb3 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_detached_worktree_in_multi.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_detached_worktree_in_multi.snap
@@ -26,6 +26,7 @@ info:
TERM: alacritty
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
WT_TEST_DELAYED_STREAM_MS: "-1"
WT_TEST_EPOCH: "1735776000"
@@ -38,6 +39,6 @@ exit_code: 0
----- stderr -----
◎ Removing feature-a worktree in background
↳ Branch unmerged; to delete, run wt remove feature-a -D
-▲ No worktree found for branch feature-b
+○ No worktree found for branch feature-b
○ Branch feature-b retained; has unmerged changes
↳ To delete the unmerged branch, run wt remove feature-b -D
diff --git a/tests/snapshots/integration__integration_tests__remove__remove_squash_merged_then_main_advanced.snap b/tests/snapshots/integration__integration_tests__remove__remove_squash_merged_then_main_advanced.snap
index 7cd40d5f1..d3a99368a 100644
--- a/tests/snapshots/integration__integration_tests__remove__remove_squash_merged_then_main_advanced.snap
+++ b/tests/snapshots/integration__integration_tests__remove__remove_squash_merged_then_main_advanced.snap
@@ -25,6 +25,7 @@ info:
TERM: alacritty
USERPROFILE: "[TEST_HOME]"
WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ WORKTRUNK_TEST_CLAUDE_INSTALLED: "0"
WORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"
WT_TEST_DELAYED_STREAM_MS: "-1"
WT_TEST_EPOCH: "1735776000"
@@ -35,5 +36,5 @@ exit_code: 0
----- stdout -----
----- stderr -----
-▲ No worktree found for branch feature-squash
+○ No worktree found for branch feature-squash
✓ Removed branch feature-squash (all changes in main, ⊂)