Skip to content

Show git dirtiness before throwing an error #135

@moble

Description

@moble

I ran into an error while benchmarking that was pretty hard to track down:

ERROR: /home/runner/work/MyProject.jl/MyProject.jl is dirty. Please commit/stash your changes before benchmarking a specific commit

But the code was a fresh checkout that I hadn't (intentionally) modified. Googling only turned up this discussion, which advised gitignoring some files I was already ignoring. It took me longer than it should have to figure out that the problem was actually something in the build process changing Project.toml. (I had manually edited the [compat] list, and failed to realize that uppercase precedes lowercase, but something in the build process helpfully rectified that mistake, leaving my repo dirty.)

Maybe part of the error message could show the git status and/or diff to show what's actually dirty?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions