Skip to content

Git pre-push hook doesn't check for uncommitted changes #149599

@theemathas

Description

@theemathas

The git pre-push hook does not check whether there are uncommitted changes in the repo or not. It probably should.

I discovered this after running git commit --amend but forgetting to actually git add the changed files. I then did a git push --force-with-lease. The pre-push hook then ran checks on the uncommitted files, found no issues, and then proceeded to allow me to push the commited files, which were different from the files that the pre-push hook checks. The pushed files failed the tidy check on github actions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-metaArea: Issues & PRs about the rust-lang/rust repository itselfC-bugCategory: This is a bug.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions