github / github/copilot-cli

Copilot requires "directory access" when searching Git commit history via `git log -L /<regex>/,/<regex>/`

Đang mở
#2,251 1 bình luận 1 reaction 0 người được giao Xem trên GitHub
area:permissions
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

### Describe the bug

Copilot (or more likely, Claude Opus) is still quite clumsy when it comes to investigating Git commit history effectively. So I frequently tell it not to pipe `git log` output into `head` or `tail` or `grep` but instead to use the available options, such as `--grep `, `-G` or `-L //,//`. The latter, however, is mistaken by Copilot as a directory access, leading to strange/funny questions like this:

```

● Trace lints section origin (shell)
└ cd /home/me/wip && git
--no-pager log -L '/\[lints/,/all.*deny/':Cargo.toml
--oneline --no-patch HEAD | head -5

╭─────────────────────────────────────────────────────────────╮
│ Allow directory access │
│ ─────────────────────────────────────────────────────────── │
│ This action may read or write the following path outside │
│ your allowed directory list. │
│ │
│ ╭─────────────────────────────────────────────────────────╮ │
│ │ /\[lints/,/all.*deny/ │ │
│ ╰─────────────────────────────────────────────────────────╯ │
│ │
│ Do you want to allow this? │
│ │
│ 1. Yes │
│ ❯ 2. Yes, and add these directories to the allowed list │
│ 3. No (Esc) │
│ │
│ ↑↓ to navigate · Enter to select · Esc to cancel │
╰─────────────────────────────────────────────────────────────╯
```

### Affected version

1.0.9

### Steps to reproduce the behavior

1. Ask Copilot to run a `git log -L` command with regular expressions
2. observe the bogus "Allow directory access" question

### Expected behavior

Copilot should not mistake the ` in `git log -L ` for a directory.

### Additional context

_No response_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.