docs: README.md/CLAUDE.md の更新、英語化、テスト追記 - #9
Conversation
checkout, pull, install --skills コマンドの追加、.worktrees/ 内からの実行対応、 CLAUDE.md Worktree Context 生成についてドキュメントを更新。 また、worktree context の動作確認セクションを task_dir 内での docker compose 実行に修正。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CLAUDE.md 以外の全ファイル(worktree, lib/, test/)のコメント、 ヘルプテキスト、ログ出力、テスト記述を英語に統一。 Worktree Context テンプレートも英語化。 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
📝 Walkthroughウォークスルーこのプルリクエストは、git-worktree-managerプロジェクト全体のユーザー向けテキストとドキュメントを日本語から英語に翻訳します。コマンドの説明、エラーメッセージ、ログ出力、テスト説明、設定ドキュメントを更新しており、基盤となる制御フローや機能ロジックに変更はありません。 変更点
推定コードレビュー工数🎯 1 (Trivial) | ⏱️ ~4 minutes 関連の可能性があるPR
ポエム
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Specify that all content except CLAUDE.md must be written in English, including source code, commit messages, PRs, issues, and tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request primarily focuses on localizing the project by translating Japanese comments, logs, and documentation into English. It also introduces new commands like worktree checkout, worktree pull, and worktree install --skills, and adds a testing framework using bats-core. Several critical issues were identified in the shell scripts regarding pipe handling under set -e and set -o pipefail, where commands like head could cause the script to exit prematurely due to SIGPIPE. Additionally, improvements were suggested for safer worktree removal and more robust string matching when checking merged branches.
Add missing skills for worktree-checkout and worktree-pull commands. Update worktree-create skill to document single-repo support and worktree layout for both single and multi-repo projects. Update install command to list all 5 available skills. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Document that tests, README.md, CLAUDE.md, and skills must all be updated whenever a command is added or modified. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
lib/cmd_create.sh (1)
28-34:⚠️ Potential issue | 🟠 Major
--branch-prefixの値未指定でset -uクラッシュしますLine 32-33 で
shift後に$1を無条件参照しているため、worktree create foo --branch-prefixのような入力で「引数不足」ではなく異常終了になります。明示的に検証してreturn 1してください。修正案(diff)
case "$1" in --branch-prefix) shift + if [ $# -eq 0 ] || [[ "$1" == -* ]]; then + log_error "--branch-prefix requires a value" + cmd_create_usage + return 1 + fi branch_prefix="$1" ;;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lib/cmd_create.sh` around lines 28 - 34, In the option-parsing case for --branch-prefix (inside the while [ $# -gt 0 ] loop and case), you're shifting then unconditionally reading $1 which triggers a crash under set -u when the value is missing; after the shift for --branch-prefix, explicitly check that $# -gt 0 (or that $1 is non-empty), emit an error message and return 1 if the value is missing, otherwise assign branch_prefix="$1" and continue. Ensure you reference the --branch-prefix branch, the shift, and the branch_prefix variable in your fix.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@lib/cmd_create.sh`:
- Around line 28-34: In the option-parsing case for --branch-prefix (inside the
while [ $# -gt 0 ] loop and case), you're shifting then unconditionally reading
$1 which triggers a crash under set -u when the value is missing; after the
shift for --branch-prefix, explicitly check that $# -gt 0 (or that $1 is
non-empty), emit an error message and return 1 if the value is missing,
otherwise assign branch_prefix="$1" and continue. Ensure you reference the
--branch-prefix branch, the shift, and the branch_prefix variable in your fix.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a9ceff2a-5571-45e9-922e-3119373179d8
📒 Files selected for processing (14)
CLAUDE.mdREADME.mdlib/cmd_checkout.shlib/cmd_cleanup.shlib/cmd_create.shlib/cmd_install.shlib/cmd_list.shlib/cmd_pull.shlib/common.shlib/deps.shlib/detect.shtest/multi_repo.batstest/single_repo.batsworktree
- cmd_create.sh: Use PIPESTATUS to check git fetch exit code, tolerating SIGPIPE (141) from head truncation - cmd_list.sh: Use PIPESTATUS for git ls-files | head pipe, tolerating SIGPIPE instead of relying on subshell || true - cmd_cleanup.sh: Add -F flag to grep for fixed-string branch matching, avoiding regex metacharacter issues in branch names - cmd_cleanup.sh: Skip rm -rf of task directory when any worktree removal failed, preventing inconsistent git state Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Changes
worktree,lib/*.sh: 全コメント・ヘルプテキスト・ログ出力を英語化lib/common.sh: Worktree Context テンプレートを英語化、サマリ表示を "Summary" に変更test/*.bats: テスト名を英語化、出力マッチ文字列を英語に更新README.md: Testing セクション追加CLAUDE.md: テストセクション追加Test plan
./test/bats/bin/bats test/single_repo.bats全12テストパス./test/bats/bin/bats test/multi_repo.bats全11テストパス🤖 Generated with Claude Code
Summary by CodeRabbit
リリースノート
新機能
worktree checkout)、リポジトリ更新(worktree pull)、スキルインストール(worktree install --skills)に対応ドキュメント
テスト