You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9b46a58
Browse filesBrowse the repository at this point in the historyBrowse files
git_diff validated target with rev_parse, which resolves one revision,
so main..feature and main...feature were refused although git diff
accepts them. A target that does not resolve whole is now split at its
first '..' or '...', and each endpoint gets the single-target checks:
no leading '-', and it must resolve. An empty endpoint means HEAD.
Closes#5194
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
Copy file name to clipboardExpand all lines: src/git/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,12 +35,12 @@ Please note that mcp-server-git is currently in early development. The functiona
35
35
- Returns: Diff output of staged changes
36
36
37
37
4.`git_diff`
38
-
- Shows differences between branches or commits
38
+
- Shows differences between branches or commits, or across a revision range
39
39
- Inputs:
40
40
-`repo_path` (string): Path to Git repository
41
-
-`target` (string): Target branch or commit to compare with
41
+
-`target` (string): Target branch or commit to compare with, or a revision range: `a..b` (from `a` to `b`) or `a...b` (from the merge base of `a` and `b` to `b`). An omitted endpoint means `HEAD`; each endpoint must resolve and cannot start with `-`
42
42
-`context_lines` (number, optional): Number of context lines to show (default: 3)
43
-
- Returns: Diff output comparing current state with target
43
+
- Returns: Diff output comparing the working tree with target, or the two endpoints of a range with each other
0 commit comments