diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-08-28 18:25:07 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-28 18:25:07 +0300 |
| commit | 095f1337d6502081658973ae3487dee8c6b34e1a (patch) | |
| tree | 4174cac82dd51dabcc1fcef57b45df2462ef1918 /docs | |
| parent | 13a9f6402fb77a31499bf758b56ca42b79936706 (diff) | |
fix: trust worktree repositories per request (#3344)
refs #3044
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/next/CHANGELOG.md | 1 | ||||
| -rw-r--r-- | docs/next/api/herdr-api.schema.json | 12 | ||||
| -rw-r--r-- | docs/next/website/src/content/docs/cli-reference.mdx | 10 | ||||
| -rw-r--r-- | docs/next/website/src/content/docs/ja/cli-reference.mdx | 10 | ||||
| -rw-r--r-- | docs/next/website/src/content/docs/zh-cn/cli-reference.mdx | 10 |
5 files changed, 31 insertions, 12 deletions
diff --git a/docs/next/CHANGELOG.md b/docs/next/CHANGELOG.md index 8a3ffe37..c94c15e2 100644 --- a/docs/next/CHANGELOG.md +++ b/docs/next/CHANGELOG.md @@ -13,6 +13,7 @@ - Oh My Pi panes now stay working when a turn ends with an automatic continuation already scheduled, instead of briefly reporting idle and completing `agent wait` early. (#2851, thanks @taoeffect) - Retained mouse selections now copy when Ctrl+C or Cmd+C arrives before a delayed mouse release instead of forwarding the copy shortcut to the pane. (#3100, thanks @moret) - Removing a background worktree workspace no longer changes focus to its parent workspace. (#3098) +- Worktree commands can now trust an explicitly selected repository for one request, allowing the full lifecycle on accessible Windows repositories owned by another SID without changing global Git configuration. (#3044) - Prefix bindings such as `prefix+|` now recognize characters produced by macOS Option and custom keyboard layouts, while exact chords such as `prefix+alt+w` keep priority. (#3079, thanks @vlcinsky) - Direct terminal attaches now preserve multiline pastes as one paste instead of submitting each line separately. (#3054) - Windows clients now preserve layout-generated text for Shift-only keys, so characters such as `/` on German keyboards reach shell panes and pasted input. (#3045) diff --git a/docs/next/api/herdr-api.schema.json b/docs/next/api/herdr-api.schema.json index 8ff90f20..aa0a8c22 100644 --- a/docs/next/api/herdr-api.schema.json +++ b/docs/next/api/herdr-api.schema.json @@ -4358,6 +4358,9 @@ "null" ] }, + "trust_repository": { + "type": "boolean" + }, "workspace_id": { "type": [ "string", @@ -4375,6 +4378,9 @@ "null" ] }, + "trust_repository": { + "type": "boolean" + }, "workspace_id": { "type": [ "string", @@ -4414,6 +4420,9 @@ "null" ] }, + "trust_repository": { + "type": "boolean" + }, "workspace_id": { "type": [ "string", @@ -4429,6 +4438,9 @@ "default": false, "type": "boolean" }, + "trust_repository": { + "type": "boolean" + }, "workspace_id": { "type": "string" } diff --git a/docs/next/website/src/content/docs/cli-reference.mdx b/docs/next/website/src/content/docs/cli-reference.mdx index f559d902..189be5b0 100644 --- a/docs/next/website/src/content/docs/cli-reference.mdx +++ b/docs/next/website/src/content/docs/cli-reference.mdx @@ -135,16 +135,18 @@ A workspace is a top-level project or work context. Creating one also creates it ## Worktrees ```bash -herdr worktree list [--workspace ID | --cwd PATH] -herdr worktree create [--workspace ID | --cwd PATH] [--branch NAME] [--base REF] [--path PATH] [--label TEXT] [--focus] [--no-focus] -herdr worktree open [--workspace ID | --cwd PATH] (--path PATH | --branch NAME) [--label TEXT] [--focus] [--no-focus] -herdr worktree remove --workspace ID [--force] +herdr worktree list [--workspace ID | --cwd PATH] [--trust-repository] +herdr worktree create [--workspace ID | --cwd PATH] [--branch NAME] [--base REF] [--path PATH] [--label TEXT] [--focus] [--no-focus] [--trust-repository] +herdr worktree open [--workspace ID | --cwd PATH] (--path PATH | --branch NAME) [--label TEXT] [--focus] [--no-focus] [--trust-repository] +herdr worktree remove --workspace ID [--force] [--trust-repository] ``` Worktrees are normal Herdr workspaces with Git checkout provenance. `worktree create` creates a Git worktree checkout, opens it as a workspace, and groups it with the parent repo workspace. If `--branch` names an existing local branch, Herdr checks it out; otherwise it creates the branch from `--base` or `HEAD`. Without `--path`, Herdr creates the checkout under `<worktrees.directory>/<repo>/<branch-slug>`. `workspace close` closes only Herdr state. Closing a primary workspace while linked-worktree workspaces are open requires `--group`; without it, the command leaves the group open and returns `workspace_group_close_required`. To delete the checkout, run `worktree remove`. It runs `git worktree remove`, never deletes the branch, and requires `--force` when Git refuses a dirty checkout. +Git rejects repositories owned by another user by default. If you have independently verified the repository, pass `--trust-repository` to trust its resolved path for that command only. Herdr does not change your Git configuration. + ## Tabs ```bash diff --git a/docs/next/website/src/content/docs/ja/cli-reference.mdx b/docs/next/website/src/content/docs/ja/cli-reference.mdx index 8466bd7b..0b3e06f3 100644 --- a/docs/next/website/src/content/docs/ja/cli-reference.mdx +++ b/docs/next/website/src/content/docs/ja/cli-reference.mdx @@ -131,16 +131,18 @@ herdr workspace create --cwd ~/project --label api --no-focus ## Worktree ```bash -herdr worktree list [--workspace ID | --cwd PATH] -herdr worktree create [--workspace ID | --cwd PATH] [--branch NAME] [--base REF] [--path PATH] [--label TEXT] [--focus] [--no-focus] -herdr worktree open [--workspace ID | --cwd PATH] (--path PATH | --branch NAME) [--label TEXT] [--focus] [--no-focus] -herdr worktree remove --workspace ID [--force] +herdr worktree list [--workspace ID | --cwd PATH] [--trust-repository] +herdr worktree create [--workspace ID | --cwd PATH] [--branch NAME] [--base REF] [--path PATH] [--label TEXT] [--focus] [--no-focus] [--trust-repository] +herdr worktree open [--workspace ID | --cwd PATH] (--path PATH | --branch NAME) [--label TEXT] [--focus] [--no-focus] [--trust-repository] +herdr worktree remove --workspace ID [--force] [--trust-repository] ``` worktree は、Git チェックアウトの出自情報を持つ通常の Herdr ワークスペースです。`worktree create` は Git worktree のチェックアウトを作成し、ワークスペースとして開き、親リポジトリのワークスペースとグループ化します。`--branch` が既存のローカルブランチを指す場合はそれをチェックアウトし、そうでなければ `--base` または `HEAD` からブランチを作成します。`--path` がない場合、チェックアウトは `<worktrees.directory>/<repo>/<branch-slug>` の下に作成されます。 `workspace close` は Herdr の状態だけを閉じます。リンクされた worktree ワークスペースが開いている間に親ワークスペースを閉じるには `--group` が必要です。指定しない場合、グループは開いたままになり `workspace_group_close_required` が返されます。`worktree remove` が明示的なチェックアウト削除の経路です。`git worktree remove` を実行し、ブランチは決して削除せず、Git がダーティなチェックアウトを拒否する場合は `--force` が必要です。 +Git はデフォルトで、別のユーザーが所有するリポジトリを拒否します。リポジトリを別途確認済みの場合は `--trust-repository` を渡すと、解決されたパスをそのコマンドでのみ信頼します。Herdr は Git 設定を変更しません。 + ## タブ ```bash diff --git a/docs/next/website/src/content/docs/zh-cn/cli-reference.mdx b/docs/next/website/src/content/docs/zh-cn/cli-reference.mdx index 91ddbc65..b00ad592 100644 --- a/docs/next/website/src/content/docs/zh-cn/cli-reference.mdx +++ b/docs/next/website/src/content/docs/zh-cn/cli-reference.mdx @@ -131,16 +131,18 @@ herdr workspace create --cwd ~/project --label api --no-focus ## Worktree ```bash -herdr worktree list [--workspace ID | --cwd PATH] -herdr worktree create [--workspace ID | --cwd PATH] [--branch NAME] [--base REF] [--path PATH] [--label TEXT] [--focus] [--no-focus] -herdr worktree open [--workspace ID | --cwd PATH] (--path PATH | --branch NAME) [--label TEXT] [--focus] [--no-focus] -herdr worktree remove --workspace ID [--force] +herdr worktree list [--workspace ID | --cwd PATH] [--trust-repository] +herdr worktree create [--workspace ID | --cwd PATH] [--branch NAME] [--base REF] [--path PATH] [--label TEXT] [--focus] [--no-focus] [--trust-repository] +herdr worktree open [--workspace ID | --cwd PATH] (--path PATH | --branch NAME) [--label TEXT] [--focus] [--no-focus] [--trust-repository] +herdr worktree remove --workspace ID [--force] [--trust-repository] ``` worktree 是带有 Git 检出来源信息的普通 Herdr 工作区。`worktree create` 创建一个 Git worktree 检出,作为工作区打开,并与父仓库工作区分到一组。如果 `--branch` 指向已有的本地分支,Herdr 检出它;否则从 `--base` 或 `HEAD` 创建分支。没有 `--path` 时,Herdr 在 `<worktrees.directory>/<repo>/<branch-slug>` 下创建检出。 `workspace close` 只关闭 Herdr 状态。当关联的 worktree 工作区仍然打开时,关闭父工作区需要 `--group`;否则命令会保留整个组并返回 `workspace_group_close_required`。`worktree remove` 是显式的检出删除路径;它运行 `git worktree remove`,从不删除分支,并在 Git 拒绝脏检出时要求 `--force`。 +Git 默认拒绝由其他用户拥有的仓库。如果你已独立验证该仓库,可传入 `--trust-repository`,仅在本次命令中信任解析后的仓库路径。Herdr 不会修改你的 Git 配置。 + ## 标签页 ```bash |
