Permission prompt incorrectly associates non-git directory with CLI session's git repo when adding safe directory
- Vorherrschende Sprache
- Shell
- Sterne
- 11.2k
- Forks
- 1.9k
- Ø Merge
- 14 Std. 16 Min.
- Gemergte PRs (30 T.)
- 6
Beschreibung
### 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_
Beitragsleitfaden
Rechercherichtung
Reproduziere den Prompt, indem du die CLI in einem von git kontrollierten Verzeichnis startest und sie aufforderst, eine Datei in einem nicht zusammenhängenden Verzeichnis wie C:\temp\copilot zu erstellen. Verfolge, wie die Auswahl des safe-directory der bearbeiteten Datei zugeordnet wird, und bestätige, dass der Prompt das Verzeichnis dieser Datei statt des aktuellen Repositorys der CLI-Sitzung nennt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- git
- Bereich
- cli, security
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 55/100