Skip to content

Refuse to push changes with a dirty git client#155946

Open
Daniel-B-Smith wants to merge 1 commit intorust-lang:mainfrom
Daniel-B-Smith:smithdb/dirty-verify
Open

Refuse to push changes with a dirty git client#155946
Daniel-B-Smith wants to merge 1 commit intorust-lang:mainfrom
Daniel-B-Smith:smithdb/dirty-verify

Conversation

@Daniel-B-Smith
Copy link
Copy Markdown
Contributor

I've run into the issue more than once where I've fixed an issue in my client but forgotten to commit it one way or another. The verification succeeds because the files on disk are correct even though the files in the commit being pushed are incorrect.

This change checks to see if there are any uncommitted changes or untracked files in the client before running the tidy checks.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 28, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 28, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @Mark-Simulacrum

@chenyukang
Copy link
Copy Markdown
Member

I'm not sure this is the way everyone need to follow, I definitely want to push to remote even there are untrack files left(for example some test files, etc), I may push to remote then git clean -fd to remove them later.

@Daniel-B-Smith
Copy link
Copy Markdown
Contributor Author

Daniel-B-Smith commented Apr 29, 2026 via email

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

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants