Skip to content

Request: hook to detect unnecessary uv.lock changes #40

@jamesbraza

Description

@jamesbraza

I often observe PRs with minor changes to application code or unit tests, but no changes to dependencies, and a uv.lock change is pushed. This uv.lock change is unnecessary, and pollutes the Git history for this uv.lock.

How do we feel about adding a pre-commit hook or GitHub Action to detect uv.lock changes?

I define an unnecessary uv.lock change as something like (I know this isn't exact, but you get the idea):

# Previously, uv.lock has changes on the Git branch `feature`
git checkout feature
git checkout main -- uv.lock
uv lock
if git diff main -- uv.lock; then
    echo "uv.lock change should be reverted."
fi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions