git: git_show diff headers lack git's a/ and b/ path prefixes
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- git
- Domain
- devtools
Research direction
The bug is in the git_show tool of the git MCP server, which emits diff headers without git's a/ and b/ prefixes. Start from where git_show builds its per-file --- and +++ header lines, and compare against git show output for a modified file plus an added or deleted file. Done means headers match git show (a/<path>, b/<path>, /dev/null for a missing side) and the output applies with git apply.
Written by the indexing model from the issue text.
Description
Problem
git_show prints each file's diff with bare paths: --- x.py^0 / +++ /dev/null, --- logic/a.py / +++ logic/a.py. git itself writes --- a/<path> / +++ b/<path>. The issue that rewrote git_show's output (#4998) asked for git's header format and /dev/null, which are met; the prefixes were left out.
Without them the output is not a patch that git apply (or patch -p1) accepts as is: they strip one leading path component, so logic/a.py is read as a.py.
Found while verifying the v1.0.0 release ledger (#5080), on mcp-server-git 2026.10.10; present on v2/main too.
Expected
git_show diff headers match git show: --- a/<path> and +++ b/<path>, with /dev/null (no prefix) for an added or deleted side.
- Dominant language
- JavaScript
- Stars
- 91.2k
- Forks
- 11.8k
- Avg merge
- 6h 52m
- Merged PRs (30d)
- 107
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from modelcontextprotocol/servers
-
documentation v2
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
modelcontextprotocol/servers#5133 ·
Maintainers usually reply within 1 day
-
sequentialthinking: the thought box's header row is 2 columns narrower than its borderPossibly taken @nightcityblade claimed this 1 day ago. Openbug server-sequentialthinking v2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
modelcontextprotocol/servers#5108 · 2 comments ·
Maintainers usually reply within 1 day
-
chore v2
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
modelcontextprotocol/servers#5091 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
modelcontextprotocol/servers#5071 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
modelcontextprotocol/servers#5059 · 2 comments ·
Maintainers usually reply within 1 day
All issues in modelcontextprotocol/servers
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jaegertracing/jaeger-ui#4596 ·
Maintainers usually reply within 1 day
-
channels:add check:passed
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Maintainers usually reply within 9 days
-
module: core
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
bigbluebutton/bigbluebutton#26028 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 91/100
twbs/bootstrap#43050 · 1 comment ·
Maintainers usually reply within 1 day
-
status:untriaged
Difficulty 1/5 Under an hour Newbie friendliness 78/100
midnightntwrk/servicedesk#248 ·
Maintainers usually reply within 1 day