Skip to content

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

Refactor `AutoStageWarning` wording to use "path" over "file"

Maximilian Roos09951e6dbf2c
diff --git a/src/commands/repository_ext.rs b/src/commands/repository_ext.rs
index 6e7424694..33ebe0756 100644
--- a/src/commands/repository_ext.rs
+++ b/src/commands/repository_ext.rs
@@ -332,8 +332,8 @@ impl AutoStageWarning {
}
let count = self.files.len();
- let file_word = if count == 1 { "file" } else { "files" };
- crate::output::warning(format!("Auto-staging {count} untracked {file_word}:"))?;
+ let path_word = if count == 1 { "path" } else { "paths" };
+ crate::output::warning(format!("Auto-staging {count} untracked {path_word}:"))?;
let joined_files = self.files.join("\n");
crate::output::gutter(format_with_gutter(&joined_files, "", None))?;
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_dirty_working_tree.snap b/tests/snapshots/integration__integration_tests__merge__merge_dirty_working_tree.snap
index 409bec62c..67c934ea9 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_dirty_working_tree.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_dirty_working_tree.snap
@@ -23,7 +23,7 @@ exit_code: 0
----- stdout -----
----- stderr -----
-🟑 Auto-staging 1 untracked file:
+🟑 Auto-staging 1 untracked path:
  dirty.txt
πŸ”„ Committing changes with default message... (1 file, +1, no squashing needed)
πŸ’‘ Using fallback commit message. Run wt config --help for LLM setup guide
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_no_commits_with_changes.snap b/tests/snapshots/integration__integration_tests__merge__merge_no_commits_with_changes.snap
index f70b68eee..e1dc4b175 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_no_commits_with_changes.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_commits_with_changes.snap
@@ -23,7 +23,7 @@ exit_code: 0
----- stdout -----
----- stderr -----
-🟑 Auto-staging 1 untracked file:
+🟑 Auto-staging 1 untracked path:
  newfile.txt
πŸ”„ Committing changes with default message... (1 file, +1, no squashing needed)
πŸ’‘ Using fallback commit message. Run wt config --help for LLM setup guide
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snap
index e93b46d84..5dacb7013 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_failure.snap
@@ -24,7 +24,7 @@ exit_code: 1
----- stdout -----
----- stderr -----
-🟑 Auto-staging 1 untracked file:
+🟑 Auto-staging 1 untracked path:
  feature.txt
πŸ”„ Running pre-commit:
  exit 1
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap
index ac463342b..e8ef4c594 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap
@@ -24,7 +24,7 @@ exit_code: 0
----- stdout -----
----- stderr -----
-🟑 Auto-staging 1 untracked file:
+🟑 Auto-staging 1 untracked path:
  feature.txt
πŸ”„ Running pre-commit:
  echo 'Pre-commit check passed'
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_with_untracked_files.snap b/tests/snapshots/integration__integration_tests__merge__merge_with_untracked_files.snap
index 5b60b240c..eea667bc8 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_with_untracked_files.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_with_untracked_files.snap
@@ -25,7 +25,7 @@ exit_code: 0
----- stdout -----
----- stderr -----
-🟑 Auto-staging 2 untracked files:
+🟑 Auto-staging 2 untracked paths:
  untracked1.txt
  untracked2.txt
πŸ”„ Squashing 1 commit & working tree changes into a single commit (3 files, +3)...
diff --git a/tests/snapshots/integration__integration_tests__merge__step_commit_no_verify.snap b/tests/snapshots/integration__integration_tests__merge__step_commit_no_verify.snap
index a32589f54..8830c7258 100644
--- a/tests/snapshots/integration__integration_tests__merge__step_commit_no_verify.snap
+++ b/tests/snapshots/integration__integration_tests__merge__step_commit_no_verify.snap
@@ -27,7 +27,7 @@ exit_code: 0
----- stderr -----
πŸ’‘ Skipping pre-commit hook (--no-verify)
-🟑 Auto-staging 2 untracked files:
+🟑 Auto-staging 2 untracked paths:
  .config/
  file1.txt
πŸ”„ Committing changes with default message... (2 files, +2)