Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gitpython-developers/GitPython
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: gitpython-developers/GitPython
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: gix-backend
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 163 files changed
  • 2 contributors

Commits on Oct 18, 2026

  1. feat!: delegate repository storage to Git and Gix

    GitPython's Python implementations of repository discovery, configuration,
    references, object storage and indexes assume storage details that do not hold
    for SHA-256 objects or reftable references. Delegate these operations to Git
    2.52+ and offer GixPython 0.2.0 for supported operations, using the Git CLI as
    the behavioral baseline.
    
    Keep library-managed commands behind argument and stdin validation, suppress
    implicit hooks, external diff programs, maintenance and lazy fetches where
    appropriate, and preserve explicit unsafe-operation opt-ins. Support SHA-1 and
    SHA-256 with files or reftable reference storage. Close owned repository handles
    before filesystem cleanup and account for Windows and Cygwin path restrictions.
    
    The optional `gix` extra selects Gitoxide through supported GixPython APIs.
    `GIT_PYTHON_BACKEND=cli|gix` makes selection explicit even when both backends are
    installed. Retain native repository handles and adapt native object, reference,
    index, graph, configuration, diff and status results where they match Git.
    Keep CLI fallbacks for missing capabilities and incompatible behavior; record
    reproductions, affected adapters and upstream requirements in the compatibility
    ledger in `doc/gix-backend.md`. Native execution never means reimplementing Git
    semantics in Python.
    
    Read declared commit encodings according to Git's first-header and whole-commit
    conversion behavior, including conversion failure and signature headers. Keep
    UTF-8 metadata native; use Git's text projection for other encodings and the
    open Gix header-order compatibility bug. Validate these cases with read-only
    Bash fixtures and direct Git comparisons. Configuration failure regressions
    exercise Git's per-mutation locks rather than the removed constructor lock.
    
    Breaking API changes follow the storage migration. Remove the Python `GitDB`
    backend and binary index/tree and raw reflog mutation interfaces. Replace
    `IndexFile.entries` with immutable `iter_entries()`/`entry()` queries and explicit
    edits; publish deferred index bytes only after Git validates them. Configuration
    uses Git's syntax and locking, reflogs expose Git's commit-reflog view, and
    repository object IDs have format-dependent widths. Remove deprecated exports
    and implicit environment-variable path expansion. Document the affected APIs,
    exceptions, hook behavior and replacements in `doc/source/changes.rst`.
    
    Move generated repository and filesystem initial states into Bash scripts run
    through `gix.testtools`. Read-only tests share prepared fixtures; mutation tests
    copy them by default, with explicit execution only for fixtures that cannot be
    relocated. Keep generated caches and archives out of version control. Tests
    require GixPython with either backend: CI runs fixture suites on Python 3.11+
    and retains installation/import smoke checks on Python 3.8-3.10. Update the
    normal, minimum-Git, Alpine and Cygwin environments and the source packaging.
    
    Add downstream release checks for Bandit, MLflow, LangChain, SWE-bench and
    DataHub with both backends. Add a read-only repository benchmark that compares
    result digests, records native/fallback decisions and actual Git launches, and
    enforces CLI-process ceilings. Preserve historical measurements and their
    original revision references as evidence, including superseded results.
    
    Make scripted tests portable to Git for Windows. Define literal submodule
    names inside Bash from simple scenario identifiers, because MSYS expands
    metacharacters in native arguments and disabling that expansion breaks
    GixPython's quoted script launcher. Retain Windows directory-symlink types
    for dangling targets and build trailing-space filenames with Git's `mktree`
    instead of the Windows-restricted index. Compare escaped log paths and
    native fixture locations correctly. Keep exact Git-recorded submodule URLs
    while separately checking path identity, including a portable `/./` regression.
    Use Git's actual text projection for platform-dependent `iconv` declarations.
    
    Alpine's musl recognizes `utf-16-be` while macOS rejects that spelling.
    Keep Git as the text baseline; independently assert the first codec, raw
    dates/timezones, and native/fallback decisions. Keep malformed UTF-16 fixtures
    odd-sized, including the portable `UTF-16BE` spelling, so conversion fails
    without erasing Git's header delimiters. Assert the raw object size to prevent
    fixture edits from reintroducing unstable pretty output. Record these
    platform limitations in `doc/gix-backend.md`.
    
    Before the Windows fixture repairs, macOS validation used CPython
    3.12.14, Git 2.54.0 and GixPython 0.2.0. The full CLI suite passed 1,745 tests with 151 skips, and the full Gix suite
    passed 1,845 tests with 51 skips. Both passed 58 subtests and retained one
    expected failure. CLI ran first. All 14 benchmark result digests and the
    existing CLI-process ceilings matched; the two-sample smoke run establishes
    no timing conclusion. Ruff lint/format, mypy, basedpyright, ShellCheck and
    Sphinx with warnings fatal passed. Hosted CI, other platforms and older
    interpreters were not run locally.
    
    The first Windows fixture repair passed 471 tests and 20 subtests on each
    backend locally but exposed a native Windows launcher failure in CI. The
    follow-up removes the `MSYS=noglob` override and preserves all literal-name
    assertions through scripted initial states. It also fixes Alpine's encoding
    expectation rather than changing production Git behavior. The focused
    commit, cleanup, fixture-health and literal-name tests passed 70 tests and
    21 subtests per backend locally, CLI first, with one Windows-only skip.
    Repository pre-commit hooks passed. On `13202ce`, 63 of 64 hosted checks
    passed, including Alpine and Windows Gix. Windows CLI on Python 3.12 exposed
    one remaining fixture expectation: direct Git returned `x` instead of an
    empty message after successful UTF-16 recoding removed every newline. The
    failure preceded the backend comparison. Force conversion failure for those
    malformed fixtures and remove the unsupported empty-output assertion while
    retaining exact Git comparisons. No production behavior changes for this
    repair. The final commit module passed 40 tests and 21 subtests per backend
    locally, CLI first, and all hooks for the changed files passed. Hosted
    verification of that final fixture correction is left to the next CI run.
    
    After rebasing onto `main` at `28ab8fb3`, the Windows Python package
    checks on `f47ce8f5` failed both variants of
    `test_root_update_skips_old_url_resolution_when_remote_matches`. Git Bash
    recorded `C:/Users/RUNNER~1/.../source`, while repository discovery returned
    the equivalent `C:/Users/runneradmin/.../source`. The test compared these
    spellings instead of checking that root update preserved the original URL.
    Capture the module's recorded URL before update, require it to stay exactly
    unchanged, and separately check directory identity with `Path.samefile()`.
    This preserves the regression's URL-mutation check across Windows short-path
    aliases without changing production behavior.
    
    The focused relative-URL submodule tests passed 39 tests with two skips on
    each backend locally, CLI first, using CPython 3.12.14, Git 2.54.0 and
    GixPython 0.2.0. Repository hooks passed for `test/test_submodule.py`.
    Windows validation of this assertion correction remains with hosted CI.
    
    Refresh the stack onto `main` at `bae0c2fb`, retaining the upstream raw
    diff parser that reads complete NUL-delimited records and the reproducible
    Sphinx attribute exclusions. Adapt the new colon/line-feed path regression
    from removed index entry APIs to a read-only `gix.testtools` Bash fixture.
    Construct its trees through `git mktree -z` so Windows need not create those
    paths on disk, and check the exact paths and addition statuses against
    `git diff-tree --name-status -z` before comparing the library result.
    
    The rebased diff suite passed all 27 tests on each backend locally, CLI
    first, with CPython 3.12.14, Git 2.54.0 and GixPython 0.2.0. Ruff lint and
    format, ShellCheck and the repository hooks passed for the affected files.
    The rebase retains one visible commit. Full suites, documentation builds and
    hosted CI were not rerun for this local update.
    
    Co-authored-by: GPT-6 Astra <codex@openai.com>
    Co-authored-by: Codex <codex@openai.com>
    Co-authored-by: Byron <sebastian.thiel@icloud.com>
    codex and Byron committed Oct 18, 2026
    Configuration menu
    Copy the full SHA
    5489428 View commit details
    Browse the repository at this point in the history
Loading