diff --git a/crates/fs/src/fake_git_repo.rs b/crates/fs/src/fake_git_repo.rs index 477d83907f26e2694297f9b6d4dafb1aedbf7eb6..12ad38056ee5e9886609ad993f842061e338f158 100644 --- a/crates/fs/src/fake_git_repo.rs +++ b/crates/fs/src/fake_git_repo.rs @@ -883,7 +883,8 @@ impl GitRepository for FakeGitRepository { _env: Arc>, ) -> BoxFuture<'_, Result<()>> { self.with_state_async(true, move |state| { - if !options.allow_empty && state.index_contents == state.head_contents { + if !options.allow_empty && !options.amend && state.index_contents == state.head_contents + { anyhow::bail!("nothing to commit (use allow_empty to create an empty commit)"); }