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 5a91588
Browse filesBrowse the repository at this point in the historyBrowse files
fix(git): create a branch on a detached HEAD, and from a commit-ish base
git_create_branch refused a detached HEAD when no base_branch was given,
and looked base_branch up only among references, so a commit SHA raised a
raw IndexError. On a detached HEAD with no base it now branches from the
current commit and names its short SHA in the reply; a base that is not a
reference is resolved as a commit-ish; an unknown base gives a clear error.
The leading '-' guard and the existing-branch check are unchanged.
Closes#5192
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
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,8 +76,8 @@ Please note that mcp-server-git is currently in early development. The functiona
76
76
- Inputs:
77
77
-`repo_path` (string): Path to Git repository
78
78
-`branch_name` (string): Name of the new branch
79
-
-`base_branch` (string, optional): Base branch to create from (defaults to current branch)
80
-
- Returns: Confirmation of branch creation
79
+
-`base_branch` (string, optional): Branch, tag or commit SHA to create from (defaults to the current branch, or to the current commit when HEAD is detached)
80
+
- Returns: Confirmation of branch creation, naming the base branch, or the short SHA when the base is a commit
0 commit comments