mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-02-19 11:54:58 -05:00
Merge pull request #3164 from 0dd/fix-git-add-validation
Add Path validation
This commit is contained in:
@@ -132,7 +132,8 @@ def git_add(repo: git.Repo, files: list[str]) -> str:
|
||||
if files == ["."]:
|
||||
repo.git.add(".")
|
||||
else:
|
||||
repo.index.add(files)
|
||||
# Use '--' to prevent files starting with '-' from being interpreted as options
|
||||
repo.git.add("--", *files)
|
||||
return "Files staged successfully"
|
||||
|
||||
def git_reset(repo: git.Repo) -> str:
|
||||
|
||||
Reference in New Issue
Block a user