mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-19 00:23:24 +02:00
fix: mcp_server_git: correct add logic for ["."] (#2379)
This commit is contained in:
@@ -115,7 +115,10 @@ def git_commit(repo: git.Repo, message: str) -> str:
|
||||
return f"Changes committed successfully with hash {commit.hexsha}"
|
||||
|
||||
def git_add(repo: git.Repo, files: list[str]) -> str:
|
||||
repo.index.add(files)
|
||||
if files == ["."]:
|
||||
repo.git.add(".")
|
||||
else:
|
||||
repo.index.add(files)
|
||||
return "Files staged successfully"
|
||||
|
||||
def git_reset(repo: git.Repo) -> str:
|
||||
|
||||
Reference in New Issue
Block a user