Permission prompt incorrectly associates non-git directory with CLI session's git repo when adding safe directory
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
### Describe the bug
Bug: When editing a file in a directory that is not under git (e.g., C:\temp\copilot), the permission prompt "Yes, and don't ask again for file operations in this repo" incorrectly references the CLI session's current git repository (C:\git\jdev\src) instead of the file's actual directory. The safe-directory association should be based on the file being edited, not the CLI's CWD.
### Affected version
You're running **GitHub Copilot CLI 1.0.56**. Worth including in your bug report!
### Steps to reproduce the behavior
start copilot in a directory that is under git control. tell copilot to create a file in a directory that is not under git control. it will ask if it can edit the file and then ask if it should put the git-controlled directory in the directories list
### Expected behavior
I would expect it to ask if it can put the directory where I've asked it to edit the file in its safe directories list.
### Additional context
_No response_
コントリビューションガイド
調査の方向性
Reproduce the prompt by starting the CLI in a git-controlled directory and asking it to create a file in an unrelated directory such as C:\temp\copilot. Trace how the safe-directory choice is associated with the edited file, and confirm that the prompt names that file's directory rather than the CLI session's current repository.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- git
- 領域
- cli, security
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 55/100