Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

クローズ 初心者向け
#5,107 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@cliffhall がすでに取り組んでいます。

2026年10月13日 から。

  • #5145 @cliffhall による — マージ済み

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
git
領域
devtools

調査の方向性

バグは git MCP サーバーの git_show ツールにあり、git の a/ と b/ のプレフィックスを付けずに diff のヘッダーを出力しています。git_show がファイルごとの --- と +++ のヘッダー行を組み立てている箇所から調べ始め、変更されたファイルと、追加または削除されたファイルについて git show の出力と比較してください。ヘッダーが git show と一致し(a/<path>、b/<path>、欠けている側は /dev/null)、出力を git apply で適用できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
JavaScript
スター
91.2k
フォーク
11.8k
平均マージ
6時間 20分
マージ済み PR(30日)
117

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

modelcontextprotocol/servers のほかの issue

modelcontextprotocol/servers の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。