Skip to content

chore(git): temporary rollup of the Git v2.7.0 PRs (do not merge) - #5729

Closed
cliffhall wants to merge 9 commits into
v2/mainfrom
v2/chore/5697-git-v2.7.0-rollup
Closed

cliffhall wants to merge 9 commits into
v2/mainfrom
v2/chore/5697-git-v2.7.0-rollup

Conversation

@cliffhall

Copy link
Copy Markdown
Member

Part of #5697

Temporary rollup PR. Do not merge. It merges the four Git v2.7.0 PRs onto current v2/main to prove they work together. It will be closed once its CI is green, and then the constituent PRs are merged individually.

The four branches merged with no conflicts, and npm run local:gate exited 0 on this head (b36de6f8). No Copilot review is requested on this PR; each constituent PR had its own.

🤖 Generated with Claude Code

cliffhall and others added 9 commits November 30, 2026 01:27
21 of the 32 tool input properties had no description, so a model saw
only their names. Add shared RepoPath and ContextLines aliases next to
DEFAULT_CONTEXT_LINES, use them for every repo_path and context_lines,
and describe git_diff.target, git_commit.message, git_add.files,
git_create_branch.branch_name, git_checkout.branch_name and
git_show.revision. A protocol-level test lists the tools and fails on
any input property without a description; the tool-list snapshot is
regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: cliffhall <cliff@futurescale.com>
git_commit went through GitPython's index.commit(), whose parse_date()
rejects ISO-8601 values native `git commit` accepts (a `Z` suffix, `+02:00`
or `-0500` offsets, fractional seconds) and misreads RFC 2822 as UTC. Read
each set variable through `git var GIT_<role>_IDENT`, so git's own date
parser decides, and pass the `<timestamp> <offset>` it prints as the explicit
author_date/commit_date on both the plain and the merge commit path. A value
git rejects still fails the commit, now with git's message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: cliffhall <cliff@futurescale.com>
git_branch returned `git branch` output verbatim: `* ` on the current
branch, `+ ` on one checked out in a linked worktree, ANSI color under
color.branch=always, `origin/HEAD -> origin/main`, and a
`(HEAD detached at ...)` entry. None of that resolves as a revision, so a
name kept from git_branch failed in git_checkout, git_diff, git_show and
git_merge.

List the refs with `git for-each-ref --format=%(refname)` under
refs/heads/ and refs/remotes/ (keeping --contains / --no-contains) and
shorten each the way `git branch` does, so every line is one bare,
unambiguous ref name.

Closes #5641

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: cliffhall <cliff@futurescale.com>
Started with --repository, the server's initialize result (2025-11-25)
and server/discover result (2026-07-28) carry instructions naming the
allowed repository root, resolved the way validate_repo_path compares
it, and telling the model to pass exactly that path as repo_path. A
model no longer has to guess a path and read the right one back from
the refusal. repo_path stays required with one schema; unconfined, the
server sends no instructions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: cliffhall <cliff@futurescale.com>
str.splitlines() also breaks on U+2028, U+0085 and other separators that
git allows inside a ref name, so such a branch came back as pieces that
resolve to nothing. Split on git's own record delimiter instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: cliffhall <cliff@futurescale.com>
…ructions' into v2/chore/5697-git-v2.7.0-rollup
@cliffhall cliffhall added the v2 label Nov 30, 2026
@changeset-bot

changeset-bot Bot commented Nov 30, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: b36de6f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

Copy link
Copy Markdown
Contributor

git: MCP interface diff

Base: dcb5cb34733a (Merge pull request #5702 from modelcontextprotocol/v2/chore/5646-error-path-secret-hygiene)
Head: the build in this checkout, at 04c6aeb9b6e6 (Merge b36de6f into dcb5cb3)

Diffed because it was named (--server).

⚠️ Interface changes detected in 3 part(s) of the interface. Review them below to confirm they are intended.

Tools Prompts Resources Resource templates
Base 14 2 0 0
Head 14 2 0 0

initialize

--- base/initialize.json
+++ target/initialize.json

+ instructions: "This server is confined to the Git repository at /home/runner/work/servers/servers/node_modules/.cac..."

tools

--- base/tools.json
+++ target/tools.json

+ tools[git_add].inputSchema.properties.files.description: "Paths of the files to stage, relative to the repository root or absolute inside it. ['.'] stages eve..."
+ tools[git_add].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_checkout].inputSchema.properties.branch_name.description: "The branch to switch to. A tag, commit SHA or remote-tracking branch is also accepted, and detaches ..."
+ tools[git_checkout].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_commit].inputSchema.properties.message.description: "The commit message"
+ tools[git_commit].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_create_branch].inputSchema.properties.branch_name.description: "The name of the new branch to create"
+ tools[git_create_branch].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_diff].inputSchema.properties.context_lines.description: "Number of context lines to show around each change. Defaults to 3."
+ tools[git_diff].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_diff].inputSchema.properties.target.description: "A branch, tag, commit SHA or relative revision (HEAD~1) to diff the working tree against, or a revis..."
+ tools[git_diff_staged].inputSchema.properties.context_lines.description: "Number of context lines to show around each change. Defaults to 3."
+ tools[git_diff_staged].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_diff_unstaged].inputSchema.properties.context_lines.description: "Number of context lines to show around each change. Defaults to 3."
+ tools[git_diff_unstaged].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_log].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_merge].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_reset].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_show].inputSchema.properties.repo_path.description: "The path to the Git repository."
+ tools[git_show].inputSchema.properties.revision.description: "The commit to show: a branch, tag, commit SHA or relative revision (HEAD~1). <revision>:<path> shows..."
+ tools[git_status].inputSchema.properties.repo_path.description: "The path to the Git repository."

instructions

Endpoint added in target (not present in base)

Updated by this run for b36de6f8a6facd4e5aef6db05b83660d7068acda.

@cliffhall

Copy link
Copy Markdown
Member Author

Closing as intended. On head b36de6f8, the merge of #5710, #5722, #5726 and #5727 onto v2/main (f549ca94) merged with no conflicts, passed npm run local:gate and passed CI (47 checks, none failed). That proves the four PRs work together, so they are now merged individually. Since then v2/main has only gained changes to src/time and an everything test, which cannot interact with them.

@cliffhall cliffhall closed this Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant