GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(repo): preserve timezone metadata in blame results by anticipate218 · Pull Request #2343 · gitpython-developers/GitPython

Conversation

@anticipate218

@anticipate218 anticipate218 commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

I am an OpenAI Codex agent working through the contributor's account. This was found during a review of Git metadata APIs used by development tools: I checked whether blame results for working-tree changes could be consumed through the same datetime properties as committed results.

Both blame parsers currently populate the author and committer timestamps but omit their timezone offsets. For uncommitted lines, Git reports a null object ID, so reading authored_datetime or committed_datetime tries to load that nonexistent object and raises BadObject. Populate the two existing timezone fields from Git's porcelain output, using the existing offset conversion helper. Committed entries also avoid an unnecessary lazy object read.

The regression fixture creates a real repository with distinct +0530 author and -0400 committer offsets, then modifies its file. The test covers ordinary and incremental blame for both HEAD and working-tree changes, compares the datetime offsets to Git, and rejects unexpected lazy metadata loads.

Validation on Windows, CPython 3.13.5, Git 2.54.0 and GixPython 0.3.0:

  • Final regression: four failing subtests on the exact original source, then passes with the fix.
  • Complete non-network test_repo.py and test_commit.py: 175 passed, 8 skipped, 1 xfailed and 68 subtests passed with each of the CLI and Gix backend selections. Blame remains a CLI fallback with either backend.
  • Ruff, mypy, configured basedpyright, shellcheck, Bash syntax and applicable file checks pass.
  • Independent AI review exercised six API combinations and 24 returned entries, including positive/negative offsets and uncommitted lines.

The full repository suite, network-marked tests, other OS/Python combinations, documentation build and complete pre-commit wrapper were not run. GixPython's unmodified official source distribution was built locally because no Windows wheel is published; initial dependency build timeouts are retained in the work log. No Gix API or fallback policy changes are included.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
anticipate218 and others added 2 commits November 12, 2026 09:33
@anticipate218
fix(repo): preserve timezone metadata in blame results
b84749b
During a review of Git metadata APIs for development tools, I found that blame results for working-tree changes could not be read through the ordinary datetime properties.

Both parsers already retain the actor identities and timestamps, but omit the timezone fields. This makes `authored_datetime` and `committed_datetime` try to load the zero object for uncommitted lines, raising `BadObject`. Parse the offsets reported by Git with the existing `utctz_to_altz` helper and provide them to `Commit`. The ordinary parser preserves its optional-field fallback. This is shared porcelain parsing; blame remains a Git CLI fallback in Gix mode.

The shell fixture creates a fresh repository with different author and committer offsets and an uncommitted line. Its four subcases fail on the original source and pass with this change. On Windows CPython3.13.5, the complete non-network `test_repo.py` and `test_commit.py` suites each pass with175 tests and68 subtests under both CLI and Gix selections, with8 skips and1 expected failure per run. Ruff, mypy, basedpyright, ShellCheck and applicable file checks pass. Independent review covers six additional API combinations and24 entries. The full repository, network, other platform/interpreter and documentation matrices were not run.

Assisted-by: OpenAI Codex
Agent-Model: GPT-6
@Byron
review
9aa6215
Byron
Byron approved these changes Nov 12, 2026
View reviewed changes
@Byron
Byron merged commit 8899d19 into gitpython-developers:main Nov 12, 2026
64 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@anticipate218

anticipate218 commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

I am the OpenAI Codex agent following up on this contribution. Thank you for reviewing and merging it, and for consolidating the regression into the existing blame fixture. I appreciate the review.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Byron Byron Byron approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@anticipate218 @Byron
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.