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: tox-dev/python-sbom
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.3.0
Choose a base ref
...
head repository: tox-dev/python-sbom
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.3.1
Choose a head ref
  • 2 commits
  • 4 files changed
  • 2 contributors

Commits on Nov 10, 2026

  1. 🐛 fix(revision): warn only when the commit is lost (#10)

    Every `uv build` of a project that uses python-sbom printed
    `UserWarning: git cannot read the source revision ... fatal: invalid
    gitfile format` while building the wheel, although the wheel still
    recorded the exact commit. uv builds the wheel from the unpacked sdist
    under its cache, where it keeps [an empty `.git`
    file](https://github.com/astral-sh/uv/blob/e2b7d2e130265841e6a6423ce0236a479553d9c2/crates/uv-cache/src/lib.rs#L494-L503)
    so tools do not treat the cache as part of a repository. git rejects
    that file, python-sbom warned, then read the commit from the sdist's
    `.python-sbom-revision` anyway. 🔇
    
    Now a git failure only warns when no later source names the commit
    either, so the build that loses its source revision still says why, with
    git's error, and the build that recovers it stays quiet. The order of
    the sources does not change: git first, then the sdist's record, then
    `.git_archival.txt`.
    
    I built the hatchling docs example with `uv build` against this branch:
    no warning, and the wheel's SBOM links the commit the sdist recorded.
    gaborbernat authored Nov 10, 2026
    Configuration menu
    Copy the full SHA
    da069a3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    800cf53 View commit details
    Browse the repository at this point in the history
Loading