We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dcb47d2 + 3827fd0 commit 862e717Copy full SHA for 862e717
src/git/src/mcp_server_git/server.py
@@ -132,7 +132,8 @@ def git_add(repo: git.Repo, files: list[str]) -> str:
132
if files == ["."]:
133
repo.git.add(".")
134
else:
135
- repo.index.add(files)
+ # Use '--' to prevent files starting with '-' from being interpreted as options
136
+ repo.git.add("--", *files)
137
return "Files staged successfully"
138
139
def git_reset(repo: git.Repo) -> str:
0 commit comments