Bug with the --exclude option for pr diff
Open
bug
gh-pr
priority-3
- Dominant language
- Go
- Stars
- 46.3k
- Forks
- 9k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 89
Description
### Describe the bug
When doing: `gh pr diff 123 --name-only --exclude '*.md'` only the first two file names are printed.
### Affected version
gh version 2.88.1 (2026-03-12)
https://github.com/cli/cli/releases/tag/v2.88.1
### Steps to reproduce the behavior
1. Type this `gh pr diff 123 --name-only --exclude '*.md'`
2. View the output ''
3. See error - incorrect behaviour in that no glob pattern actually works.
### Expected vs actual behavior
When using the `--exclude` option for `pr diff ..` I expect some files to be excluded, but the behaviour is irratic.
### Logs
N/A.
Contributor guide
Assessment
This issue has not been assessed yet.