Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

git: git_show diff headers lack git's a/ and b/ path prefixes

Open Beginner friendly
#5,107 0 comments 0 reactions 0 assignees View on GitHub

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

bug server-git v2

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from modelcontextprotocol/servers

All issues in modelcontextprotocol/servers

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.