Repository navigation
Comparing changes
Open a pull request
base repository: openSUSE-Python/GitPython
base: main
head repository: gitpython-developers/GitPython
compare: main
- 14 commits
- 60 files changed
- 5 contributors
Commits on Nov 3, 2026
-
fix: read reference arguments by exact name in revision APIs
<!-- agent --> `Reference.__str__` returns the short name, so `refs/heads/main` becomes `main` and `refs/remotes/origin/main` becomes `origin/main`. The revision APIs turned reference objects into revisions with `str(ref)` or `Git._check_operand(ref, "revision")`, and Git's revision lookup (gitrevisions(7)) tries `refs/tags/<name>` before `refs/heads/<name>` and `refs/remotes/<name>`, only warning about the ambiguity on stderr. A tag that shares a branch's short name therefore took the branch's place. Whoever controls a remote can supply such tags: `git fetch` auto-follows tags that point into fetched history, and a clone brings in every tag. With a branch `main` and fetched tags `main` and `origin/main` on another commit, `repo.heads.main.commit` still reported the branch, but these APIs used the tag's commit on both backends: - `Repo.commit()`, `Repo.tree()`, `Object.new()`, `Repo.iter_commits()` - `Repo.merge_base()`, `Repo.is_ancestor()`, `Diffable.diff()` - `Repo.blame()`, `Repo.blame_incremental()`, `Repo.archive()` - `IndexFile.from_tree()`, `IndexFile.merge_tree()`, `IndexFile.reset()` - `HEAD.reset()`, `Repo.create_head()`, `Repo.create_tag()` In the documented merge workflow, `merge_base(new_branch, original_branch)` followed by `index.merge_tree(original_branch, base=...)`, the merge commit received the tag's tree while its parents named the branch commits. `repo.head.reset(repo.heads.main, working_tree=True)` and `repo.index.reset(ref, head=True)` moved the current branch to the tag's commit and wrote its files into the working tree. Add `Git._check_revision()`. For a `SymbolicReference` it reads the exact reference through `dereference_recursive()`, the `show-ref`/Gix read behind `ref.object`, and passes on the object ID, which is how `SymbolicReference.set_object()` already resolves reference arguments. Strings keep Git's name guessing, as the changelog already documents. `merge_base()` resolves its top-level arguments before `_unpack_args()` flattens them. A reference that does not exist now raises `ValueError`, as `ref.object` does, instead of resolving to whatever Git guesses for its short name. On the CLI backend each reference argument costs one or two extra short Git calls; the Gix backend reads references natively, and `doc/gix-backend.md` is unchanged. Validation: the new `shadowed` case in `tests/fixtures/exact-refs.sh` backs `test_reference_arguments_do_not_resolve_same_named_tags` in `test/test_refs.py`, which checks the APIs above for a branch and a remote-tracking branch. It fails before the change and passes after it with `GIT_PYTHON_BACKEND=cli` and `GIT_PYTHON_BACKEND=gix` for SHA-1/SHA-256 and files/reftable (Git 2.52.0, GixPython 0.3.0, Python 3.11, macOS). Full suites with the change: CLI 1,915 passed and Gix 2,018 passed. Each run also had 116 failures, and the same 116 tests fail on the unpatched tree; they need history and tags such as `0.1.5`, which this shallow clone lacks. `ruff check`, `ruff format --check`, ShellCheck, `mypy --python-version=3.11` and `basedpyright --warnings` pass. Agent-Model: claude-opus-5-5
Configuration menu - View commit details
-
Copy full SHA for d03d3d7 - Browse repository at this point
Copy the full SHA d03d3d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2524e95 - Browse repository at this point
Copy the full SHA 2524e95View commit details
Commits on Nov 4, 2026
-
fix(refs): preserve full reference names in revision APIs
<!-- agent: Codex --> Converting reference arguments to object IDs prevents same-named tags from replacing branches, but loses the reference identity required by several Git operations. Reflog walks then return no commits, fork-point lookup fails with `No such ref`, and the default `upload-archive` server rejects the literal ID. References inside nested `merge_base()` arguments also still became short names and could select a shadowing tag. Keep the exact-reference existence and symbolic-chain checks in `Git._check_revision()`, then pass the validated full ref name. This preserves Git's ref-dependent behavior without operation-specific conversion switches. Strings retain Git's revision interpretation and commit objects retain their IDs. Normalize `os.PathLike` operands through `os.fsdecode()` before validation so their filesystem paths, including byte paths, are used instead of their display strings. Flatten nested list/tuple merge-base arguments while preserving reference objects until each operand is validated. Extend `tests/fixtures/exact-refs.sh` with an upstream advance and rewind plus a topic based on its old tip. Regressions compare branch, remote-tracking and HEAD behavior with Git 2.54.0 across SHA-1/SHA-256 and files/reftable repositories. They cover shadowing tags, missing refs, nested operands, option spellings, remote archives and safe/unsafe `PathLike` values. Update the changelog and document the retained CLI fallbacks: GixPython 0.3.0 exposes neither the required reflog-walk/fork-point operations nor an upload-archive client. Assisted-by: GPT 6.1 Sol Co-authored-by: GPT 6.1 Sol <codex@openai.com>
Configuration menu - View commit details
-
Copy full SHA for 6de90f1 - Browse repository at this point
Copy the full SHA 6de90f1View commit details -
test: mark network-dependent tests for restricted builders
<!-- aent --> SUSE and openSUSE package builders disable network access for reproducible builds. Allow them to exclude network-using tests with `pytest -m 'not net'` while retaining local filesystem tests. Register `net` in `pyproject.toml` and document in `CONTRIBUTING.md` that it includes loopback sockets and fixture-triggered package downloads, not just internet access. Mark the daemon-based repository tests, stalled remote timeout cases, daemon restart test, installation test, and the already-skipped external clone test. Mark only the daemon-launching cleanup parameter so the other cleanup cases remain selected. Existing skips and test bodies remain unchanged. Normalize TOML formatting and imports in the touched files. Assisted-by: GPT 6.0 Astra Co-authored-by: GPT 6.0 Astra <codex@openai.com>
Configuration menu - View commit details
-
Copy full SHA for cb10d13 - Browse repository at this point
Copy the full SHA cb10d13View commit details -
Merge pull request gitpython-developers#2336 from Keerthana-64/ref-ar…
…gs-exact-name fix: read reference arguments by exact name in revision APIs
Configuration menu - View commit details
-
Copy full SHA for 652cb3f - Browse repository at this point
Copy the full SHA 652cb3fView commit details -
Merge pull request gitpython-developers#2338 from gitpython-developer…
…s/no-network no network
Configuration menu - View commit details
-
Copy full SHA for 8e919a4 - Browse repository at this point
Copy the full SHA 8e919a4View commit details -
fix(util): tolerate deleted temporary environment variables
When a `patch_env()` body deletes a variable that was initially absent, cleanup raises `KeyError` and can mask an exception from the body. Use `os.environ.pop(name, None)` to restore absence idempotently while preserving restoration of existing values. Add 18 regression cases for absent, empty and populated original values, keep/replace/delete body mutations and normal/exceptional exits. The focused CLI-backend tests changed from 2 failed and 16 passed to 18 passed. Ruff lint/format and `git diff --check` passed. The full suite was not run because its required `GixPython` Windows wheel was unavailable. Agent-Model: unknown
Configuration menu - View commit details
-
Copy full SHA for e52b7f8 - Browse repository at this point
Copy the full SHA e52b7f8View commit details
Commits on Nov 5, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 32b4d8e - Browse repository at this point
Copy the full SHA 32b4d8eView commit details -
Merge pull request gitpython-developers#2340 from Abedyn/fix/patch-en…
…v-deleted-variable fix(util): tolerate deleted temporary environment variables
Configuration menu - View commit details
-
Copy full SHA for f6db6e7 - Browse repository at this point
Copy the full SHA f6db6e7View commit details -
test(refs): use POSIX paths for Git reference names
<!-- agent --> Restore Windows CI coverage for `PathLike` revision arguments. The test introduced in `6de90f1c` uses `Path("refs/heads/main")`, which emits backslashes on Windows. Those are invalid Git reference names, so resolving `SymbolicReference` fails during ref-name validation in all four files/reftable and SHA-1/SHA-256 variants. The same failures were already present in PR gitpython-developers#2336, before the unrelated `patch_env()` change in PR gitpython-developers#2340. Use `PurePosixPath` for the test's Git reference names, which use forward slashes on every platform. It still implements `os.PathLike`, preserving coverage through `SymbolicReference` and direct and nested `merge_base()` arguments alongside `PathLikeMock`. Keep native `Path` for filesystem operations elsewhere in the module and preserve production validation. Assisted-by: GPT 6.1 Sol Co-authored-by: GPT 6.1 Sol <codex@openai.com>Configuration menu - View commit details
-
Copy full SHA for 9bfb816 - Browse repository at this point
Copy the full SHA 9bfb816View commit details -
test: isolate repository fixtures from checkout history
Took a quick look, pretty zoomed out, but think it's a desirable change as finally the test-suite is independent of the input repository or state. <!-- agent --> Make PR and post-merge test results independent of checkout depth, refs, and history. The shared test repository and dependency clone sources previously came from the source checkout, requiring historical objects and a bootstrap script even though setup already used `gix.testtools`. Generate small repositories from scratch through `gix.testtools`, with named root, release, merge, conflict, rename, date, and submodule states. Adapt legacy assertions to those scenarios while retaining merge, serialization, traversal, index, remote, and nested-submodule coverage. Make dirty-submodule removal checks explicit for staged, unstaged, and untracked data, including dry runs. Remove the source-history environment override, dependency factory, checkout lock cleanup, and bootstrap script. The main CI suites now use shallow checkouts and remove source `.git` metadata before pytest. Add a regression that initializes the shared fixture from a source copy without Git metadata, and document the isolation requirement. Hash raw parser samples in cache arguments to avoid archive filename limits on cold runs. Assisted-by: GPT 6.0 Astra Co-authored-by: GPT 6.0 Astra <codex@openai.com>
Configuration menu - View commit details
-
Copy full SHA for 0901035 - Browse repository at this point
Copy the full SHA 0901035View commit details -
test(gitdb): generate standalone packed and loose object fixtures
<!-- agent --> GitDB tests previously opened the source checkout's `.git` directory or `GITDB_TEST_GIT_REPO_BASE`, making their input depend on clone history. Give each test class a disposable repository generated by a fixture script, with packed history and additional loose objects. Isolate Git configuration and identity during setup and register class cleanup. Run the script with Bash so the standalone suite retains Python 3.8 support without adding a GixPython dependency. Remove the history override and full-depth checkout from dependency CI, remove source `.git` before running the suite, and document the new setup. Use the actual database size when writing a pack instead of the unrelated iteration count, which the smaller fixture exposed. Assisted-by: GPT 6.0 Astra Co-authored-by: GPT 6.0 Astra <codex@openai.com>
Configuration menu - View commit details
-
Copy full SHA for f7633d8 - Browse repository at this point
Copy the full SHA f7633d8View commit details -
fix(benchmarks): address review feedback on workload comparisons and …
…counts <!-- agent --> Address benchmark review feedback on the generated fixtures. Copilot noted that "performance tests still report their iteration limits of 1,000–10,000 as processed counts" even though the fixture has only 90 packed objects. Use the existing streaming counters and clamp list-based limits to the available SHA count so both totals and throughput reflect completed work. Copilot also requested: "Include the benchmark harness sources in the fingerprint, and add a harness-only change to the digest regression test." Hash the Python sources in `test/performance` alongside `VERSION` and `git`. This prevents comparing different timed workloads that return the same result. Extend the generated source fixture and document the digest scope. Assisted-by: GPT 6.0 Astra Co-authored-by: GPT 6.0 Astra <codex@openai.com>
Configuration menu - View commit details
-
Copy full SHA for 7e8aa8c - Browse repository at this point
Copy the full SHA 7e8aa8cView commit details -
Merge pull request gitpython-developers#2341 from gitpython-developer…
…s/fix-ci test: isolate repository fixtures and restore Windows reference coverage
Configuration menu - View commit details
-
Copy full SHA for 34dfb13 - Browse repository at this point
Copy the full SHA 34dfb13View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...main