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 01075ca
Browse filesBrowse the repository at this point in the historyBrowse files
committed
fix(git): resolve --repository to the repo root; log a missing path
`--repository` now walks up to the enclosing working tree, the way
`git rev-parse --show-toplevel` does, so `--repository .` works when a
shared config is launched from any subdirectory of the repository (#3029).
A resolved path that differs from the one given is logged at startup.
Ported from #3997.
A `--repository` path that does not exist no longer escapes serve() as
NoSuchPathError with a Python traceback: it is logged as a one-line error,
like an invalid repository, and the process exits 1 (#4993).
The pinning tests in test_entrypoints.py now assert the fixed behavior and
their KNOWN BUG markers are gone.
Closes#3029Closes#4993
Co-authored-by: Fazeel Usmani <[email protected]>
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
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -123,6 +123,8 @@ python -m mcp_server_git
123
123
124
124
## Configuration
125
125
126
+
`--repository` (`-r`) accepts any path inside a Git working tree. At startup the server walks up to the enclosing repository root, the way `git rev-parse --show-toplevel` does, so `--repository .` works when a shared config is launched from any subdirectory of the repository. A path inside the repository therefore allows tool calls anywhere in that repository, not only under the subdirectory given. A path that does not exist, or is not inside a Git repository, is logged as a one-line error at startup.
0 commit comments