Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
29ea7d9
feat!: use guarded Git commands for repository storage
codex Oct 1, 2026
0aec1a2
ci: build supported Git for Cygwin tests
codex Oct 1, 2026
651c7e8
test: handle symlinked Git directories in refresh checks
codex Oct 1, 2026
9d88173
fix: preserve repository and object paths across platforms
codex Oct 1, 2026
7793e52
test: cover Cygwin index filename restrictions
codex Oct 1, 2026
2044870
test: preserve hidden gitfiles when preparing submodule aliases
codex Oct 1, 2026
c49e5c2
test: clean up read-only submodule object files on Windows
codex Oct 1, 2026
871c9a2
fix(submodule): close repositories owned by update operations
codex Oct 1, 2026
e160bc6
ci: install supported Git in the normal Cygwin layout
codex Oct 1, 2026
466208b
test(downstream): run released Bandit baseline tests against this che…
codex Oct 1, 2026
d8b6db3
test(downstream): validate the latest MLflow Git integration
codex Oct 1, 2026
acbd9fb
test(downstream): exercise released LangChain GitLoader integration
codex Oct 1, 2026
a1e512b
test(downstream): cover SWE-bench cloning across Git storage formats
codex Oct 1, 2026
2f81869
test(downstream): run DataHub Git integration for its latest release
codex Oct 1, 2026
00a4808
feat(gix): select the released backend through an installation extra
codex Oct 1, 2026
a4034fd
feat(gix): read object headers with native lookup
codex Oct 1, 2026
3b6be62
feat(gix): stream small objects from native storage
codex Oct 1, 2026
dbc07a7
feat(gix): resolve revisions and repository metadata natively
codex Oct 1, 2026
29b5c81
feat(gix): enumerate tree entries natively
codex Oct 1, 2026
9a69f0b
feat(gix): resolve symbolic reference targets natively
codex Oct 1, 2026
81566e7
feat(gix): enumerate reference names natively
codex Oct 1, 2026
2949ba5
feat(gix): query merged repository configuration natively
codex Oct 1, 2026
2201d59
feat(gix): list worktree metadata natively
codex Oct 1, 2026
4853179
feat(gix): find merge bases and test ancestry natively
codex Oct 1, 2026
a5955d1
feat(gix): count reachable commits natively
codex Oct 1, 2026
48c3e0c
feat(gix): iterate first-parent commit history natively
codex Oct 1, 2026
0395092
feat(gix): read index entries natively
codex Oct 1, 2026
512f2a6
feat(gix): query the index version natively
codex Oct 1, 2026
4bf5be6
feat(gix): hash and store objects natively
codex Oct 1, 2026
1a32284
feat(gix): write index trees with the native editor
codex Oct 1, 2026
c33aef8
feat(gix): serialize trees with native object storage
codex Oct 1, 2026
d19b704
feat(gix): initialize private indexes from trees natively
codex Oct 1, 2026
b7ebe23
feat(gix): persist index edits through native snapshots
codex Oct 1, 2026
ca95749
feat(gix): create unsigned UTF-8 commits natively
codex Oct 1, 2026
5d2344a
feat(gix): read reference logs natively
codex Oct 1, 2026
5cc196a
feat(gix): resolve supported committer identities through Gix
codex Oct 1, 2026
ff1b1f9
feat(gix): update supported reference targets natively
codex Oct 1, 2026
b922073
feat(gix): compute raw tree diffs natively
codex Oct 1, 2026
31d7a1d
feat(gix): compute commit statistics natively
codex Oct 1, 2026
d61cf76
feat(gix): discover untracked files natively
codex Oct 1, 2026
cd315d7
feat(gix): check ignored paths natively
codex Oct 1, 2026
8abea27
feat(gix): check repository dirtiness natively
codex Oct 1, 2026
4c88830
build(gix): preserve the extra in local source distributions
codex Oct 1, 2026
e935a2d
fix(gix): omit dangling symbolic references from enumeration
codex Oct 1, 2026
3549393
fix(gix): defer compatibility object formats to Git
codex Oct 1, 2026
225b41a
docs(gix): document release setup and native conversion gaps
codex Oct 1, 2026
6fddca0
test: avoid repository setup for actor and exception tests
codex Oct 6, 2026
a5625da
test: prepare historical dependency sources once on demand
codex Oct 6, 2026
357d17d
test: copy prepared submodule baselines for each case
codex Oct 6, 2026
15c117e
test: reuse prepared submodule rejection layouts
codex Oct 6, 2026
a1b47d7
test: reuse a prepared revision graph with isolated copies
codex Oct 6, 2026
9257177
test: read historical trees without cloning a checkout
codex Oct 6, 2026
9e4771f
test: copy prepared no-fetch source and submodule repositories
codex Oct 6, 2026
4090518
docs: record fixture optimization validation and suite timings
codex Oct 6, 2026
29eb2f4
test(perf): benchmark repository journeys across CLI and GixPython
codex Oct 7, 2026
381a1e0
ci: compare CLI and GixPython repository benchmarks
codex Oct 7, 2026
5b663d3
docs(perf): record measured CLI and GixPython repository journeys
codex Oct 7, 2026
5a06caf
test(gix): count CLI process launches and enforce benchmark ceilings
codex Oct 7, 2026
6d0889d
perf(gix): retain native repository handles on `Repo`
codex Oct 7, 2026
453f449
perf(gix): open repositories with supported native metadata
codex Oct 7, 2026
888cc4b
docs(perf): preserve pre-audit retained-handle measurements
codex Oct 7, 2026
6165116
refactor(gix): centralize retained repository access on `Repo`
codex Oct 7, 2026
47afff2
perf(gix): resolve fixed metadata paths from the native Git directory
codex Oct 7, 2026
a5d7049
perf(gix): reuse object streams for serialization readback
codex Oct 7, 2026
3758cc0
perf(gix): read absent references without CLI fallbacks
codex Oct 7, 2026
0e952e0
perf(gix): validate reference names without opening Git
codex Oct 7, 2026
1af8db5
perf(gix): discover gitfiles through canonical native repositories
codex Oct 7, 2026
c8526f5
perf(gix): resolve revision path metadata without cat-file
codex Oct 7, 2026
933397a
perf(gix): parse submodule inventory and cached fields natively
codex Oct 7, 2026
d9df415
docs(gix): record remaining configuration binding requirements
codex Oct 7, 2026
170ece9
perf(cmd): share minimum Git version checks across wrappers
codex Oct 7, 2026
4ecabd1
test(gix): keep hook lookup and execution on Git
codex Oct 7, 2026
2edf913
test(perf): track native repository reads and required fallbacks
codex Oct 7, 2026
105114d
docs(gix): track strict Git compatibility and verified measurements
codex Oct 7, 2026
ea24b47
ci(downstream): test releases with CLI and Gix backends
codex Oct 7, 2026
f6779db
perf(repo): batch repository metadata queries
codex Oct 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 0 additions & 144 deletions .basedpyright/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,75 +8,9 @@
"endColumn": 45,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 41,
"endColumn": 48,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 32,
"endColumn": 39,
"lineCount": 1
}
},
{
"code": "reportCallIssue",
"range": {
"startColumn": 25,
"endColumn": 46,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 30,
"endColumn": 39,
"lineCount": 1
}
}
],
"./git/db.py": [
{
"code": "reportIncompatibleMethodOverride",
"range": {
"startColumn": 8,
"endColumn": 12,
"lineCount": 1
}
},
{
"code": "reportIncompatibleMethodOverride",
"range": {
"startColumn": 8,
"endColumn": 14,
"lineCount": 1
}
}
],
"./git/index/base.py": [
{
"code": "reportArgumentType",
"range": {
"startColumn": 30,
"endColumn": 36,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 28,
"endColumn": 34,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
Expand Down Expand Up @@ -186,14 +120,6 @@
"endColumn": 25,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 52,
"endColumn": 84,
"lineCount": 1
}
}
],
"./git/objects/tag.py": [
Expand Down Expand Up @@ -274,32 +200,6 @@
}
}
],
"./git/refs/log.py": [
{
"code": "reportArgumentType",
"range": {
"startColumn": 30,
"endColumn": 34,
"lineCount": 1
}
},
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 17,
"endColumn": 22,
"lineCount": 1
}
},
{
"code": "reportArgumentType",
"range": {
"startColumn": 28,
"endColumn": 30,
"lineCount": 1
}
}
],
"./git/refs/reference.py": [
{
"code": "reportIncompatibleVariableOverride",
Expand All @@ -310,16 +210,6 @@
}
}
],
"./git/refs/symbolic.py": [
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 15,
"endColumn": 20,
"lineCount": 1
}
}
],
"./git/refs/tag.py": [
{
"code": "reportIncompatibleMethodOverride",
Expand All @@ -339,22 +229,6 @@
}
],
"./git/remote.py": [
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 26,
"endColumn": 38,
"lineCount": 1
}
},
{
"code": "reportAttributeAccessIssue",
"range": {
"startColumn": 26,
"endColumn": 38,
"lineCount": 1
}
},
{
"code": "reportAttributeAccessIssue",
"range": {
Expand All @@ -373,14 +247,6 @@
}
],
"./git/repo/base.py": [
{
"code": "reportReturnType",
"range": {
"startColumn": 15,
"endColumn": 28,
"lineCount": 1
}
},
{
"code": "reportTypedDictNotRequiredAccess",
"range": {
Expand Down Expand Up @@ -446,16 +312,6 @@
}
}
],
"./git/repo/fun.py": [
{
"code": "reportReturnType",
"range": {
"startColumn": 11,
"endColumn": 20,
"lineCount": 1
}
}
],
"./test/deprecation/test_basic.py": [
{
"code": "reportUnusedExpression",
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/backend-benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Backend benchmark

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
compare-backends:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- name: Ensure Git 2.52 or newer
run: |
if ! dpkg --compare-versions "$(git version | awk '{print $3}')" ge 2.52; then
sudo add-apt-repository --yes ppa:git-core/ppa
sudo apt-get update
sudo apt-get install --yes git
fi
- name: Install separate backends with the same interpreter
run: |
python -m venv .bench-cli
python -m venv .bench-gix
.bench-cli/bin/python -m pip install . -r test/performance/benchmark-requirements.txt
.bench-gix/bin/python -m pip install '.[gix]' -r test/performance/benchmark-requirements.txt
- name: Prepare an existing repository outside the timed operations
env:
BENCH_REPO: ${{ runner.temp }}/benchmark-repo
GIT_CONFIG_NOSYSTEM: "1"
GIT_CONFIG_GLOBAL: /dev/null
run: |
git init --object-format=sha1 --ref-format=files "$BENCH_REPO"
git -C "$BENCH_REPO" fetch --no-tags "$GITHUB_WORKSPACE" 6ba2c0a2f9ee7feffd7e079621c4845820180c9a
git -C "$BENCH_REPO" checkout -b benchmark FETCH_HEAD
git -C "$BENCH_REPO" config core.excludesFile /dev/null
git -C "$BENCH_REPO" config core.attributesFile /dev/null
git -C "$BENCH_REPO" config core.fsmonitor false
git -C "$BENCH_REPO" config core.untrackedCache false
git -C "$BENCH_REPO" config gc.auto 0
git -C "$BENCH_REPO" config maintenance.auto false
mkdir "$BENCH_REPO/.benchmark-cache"
touch "$BENCH_REPO/.benchmark-cache/probe" "$BENCH_REPO/benchmark-untracked.txt"
echo '.benchmark-cache/' >> "$BENCH_REPO/.git/info/exclude"
mkdir benchmark-results
- name: Measure GixPython operations, opening and discovery first
run: |
.bench-gix/bin/python -m test.performance.bench_repository \
--repo "$RUNNER_TEMP/benchmark-repo" --expect-backend gix -o benchmark-results/gix.json
- name: Measure CLI operations, opening and discovery
run: |
.bench-cli/bin/python -m test.performance.bench_repository \
--repo "$RUNNER_TEMP/benchmark-repo" --expect-backend cli -o benchmark-results/cli.json
- name: Check parity and publish comparison
run: |
.bench-gix/bin/python -m test.performance.compare_backends \
benchmark-results/cli.json benchmark-results/gix.json \
--cli-budget test/performance/cli-budget.json > benchmark-results/comparison.md
cat benchmark-results/comparison.md >> "$GITHUB_STEP_SUMMARY"
.bench-gix/bin/python -m pyperf compare_to \
benchmark-results/cli.json benchmark-results/gix.json --table --table-format md \
>> "$GITHUB_STEP_SUMMARY"
- name: Retain raw timings and comparison
if: always()
uses: actions/upload-artifact@v7
with:
name: backend-benchmark
path: benchmark-results/
16 changes: 15 additions & 1 deletion .github/workflows/cygwin-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,25 @@ jobs:
- name: Install Cygwin
uses: cygwin/cygwin-install-action@v6
with:
packages: curl git python39 python-setuptools-wheel
packages: >-
curl gcc-core git libcurl-devel libexpat-devel libiconv-devel
libssl-devel make python39 python-setuptools-wheel zlib-devel
add-to-path: false # No need to change $PATH outside the Cygwin environment.

- name: Arrange for verbose output
run: |
# Arrange for verbose output but without shell environment setup details.
echo 'set -x' >~/.bash_profile

- name: Build minimum supported Cygwin Git
run: |
# Cygwin's packaged Git is older than our minimum supported version.
git clone --depth 1 --branch v2.52.0 -- https://github.com/git/git.git /tmp/git-source
# Use Cygwin's normal prefix: GitPython checks for uname next to git.
make -C /tmp/git-source -j2 prefix=/usr NO_GETTEXT=YesPlease NO_TCLTK=YesPlease NO_PERL=YesPlease install
hash -r
test "$(git version)" = 'git version 2.52.0'

- name: Special configuration for Cygwin git
run: |
git config --global --add safe.directory "$(pwd)"
Expand Down Expand Up @@ -87,6 +98,9 @@ jobs:
run: |
pip install ./smmap ./gitdb '.[test]'

- name: Verify Cygwin Git detection
run: python -c 'from git import Git; assert Git.is_cygwin()'

- name: Show POSIX file ownership
# Cygwin's `ls -ld` reports the NTFS Owner SID via Cygwin's SID-to-uid
# mapping (well-known SIDs by their RID, machine-local accounts by
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/downstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Downstream compatibility

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
project: [langchain, mlflow, bandit, swebench, datahub]
backend: [gix, cli]
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Ensure Git 2.52 or newer
run: |
if ! dpkg --compare-versions "$(git version | awk '{print $3}')" ge 2.52; then
sudo add-apt-repository --yes ppa:git-core/ppa
sudo apt-get update
sudo apt-get install --yes git
fi
- name: Install uv
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
version: '0.12.13'
enable-cache: false
- name: Test latest release against this checkout
run: uv run test/downstream/run.py "${{ matrix.project }}" --backend "${{ matrix.backend }}"
42 changes: 42 additions & 0 deletions .github/workflows/git-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Minimum Git CLI

on:
push:
branches: [main]
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
git-2-52:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@v7
with:
repository: git/git
ref: v2.52.0
path: .git-source
- uses: actions/setup-python@v7
with:
python-version: '3.12'
- name: Build minimum supported Git
working-directory: .git-source
run: |
make -j2 prefix="$RUNNER_TEMP/git" NO_GETTEXT=YesPlease NO_TCLTK=YesPlease NO_PERL=YesPlease NO_CURL=YesPlease install
echo "$RUNNER_TEMP/git/bin" >> "$GITHUB_PATH"
- name: Install GitPython and test dependencies
run: python -m pip install ./smmap ./gitdb '.[test]'
- name: Verify native format and safety contracts
env:
GIT_CONFIG_NOSYSTEM: '1'
GIT_CONFIG_GLOBAL: /dev/null
GIT_AUTHOR_NAME: GitPython Tests
GIT_AUTHOR_EMAIL: tests@example.invalid
GIT_COMMITTER_NAME: GitPython Tests
GIT_COMMITTER_EMAIL: tests@example.invalid
run: |
git version
python -m pytest --no-cov --tb=short test/test_cli_objects_index.py test/test_cli_safety.py test/test_reflog.py test/test_config.py test/test_remote_cli.py test/test_submodule.py::test_submodule_cli_lifecycle
Loading
Loading