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 c0eabd4
Browse filesBrowse the repository at this point in the historyBrowse files
fix(repo): retain revision tree context and path errors
MCP Server Git 2026.10.19's unchanged suite exposes three regressions in
`Repo.rev_parse()`: `HEAD:` returns a root `Tree` without a path, so directory
listing fails, and a missing `HEAD:<path>` raises generic `BadName` instead of
the established tree lookup `KeyError`. All three tests pass with released
GitPython 3.2.1 and fail with both local backends before this correction.
Retain an empty path for successfully resolved root trees when Git's
`objectmode` atom or Gix's `RevisionSpec.path_and_mode()` omits that context.
Factor the existing Git-validated colon boundary query so missing paths use
the public backend-managed `Tree.join()` for missing-component diagnostics,
including nested paths and colons inside commit-message searches. Git/Gix
continue to resolve revisions and read trees; no storage or Git semantics are
implemented separately in Python. The diagnostic prefix resolver retains a
documented CLI fallback until GixPython exposes compatible failed-path context.
Add a scripted fixture and eight regression cases across SHA-1/SHA-256 and
files/reftable; all eight fail before the correction. The repository/revision
and downstream suites pass 184 tests, two skips and 14 subtests on CLI; adding
native backend parity tests passes 286 tests, two skips and 14 subtests on Gix.
MCP Server Git's full unchanged suite now passes all 186 tests on each backend.
Ruff lint/format, ShellCheck for the fixture, mypy for `git/repo/fun.py`, and
`git diff --check` pass with Python 3.12.15, Git 2.53.0 and GixPython 0.2.0.
0 commit comments