Skip to content

Commit

Permalink
chore: improve uncommitted changes error message (#1434)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoIeni authored May 2, 2024
1 parent 8b69468 commit 8437e99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/git_cmd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ impl Repo {
/// Check if there are uncommitted changes.
pub fn is_clean(&self) -> anyhow::Result<()> {
let changes = self.changes_except_typechanges()?;
anyhow::ensure!(changes.is_empty(), "the working directory of this project has uncommitted changes. Please commit or stash these changes:\n{changes:?}");
anyhow::ensure!(changes.is_empty(), "the working directory of this project has uncommitted changes. If these files are both committed and in .gitignore, either delete them or remove them from .gitignore. Otherwise, please commit or stash these changes:\n{changes:?}");
Ok(())
}

Expand Down

0 comments on commit 8437e99

Please sign in to comment.