diff --git a/crates/turborepo-scm/src/git.rs b/crates/turborepo-scm/src/git.rs index c3c133d52b9e87..8a2fdc3663214f 100644 --- a/crates/turborepo-scm/src/git.rs +++ b/crates/turborepo-scm/src/git.rs @@ -39,10 +39,13 @@ impl SCM { Self::Git(git) => { match git.changed_files(turbo_root, from_commit, to_commit, include_uncommitted) { Ok(files) => Ok(ChangedFiles::Some(files)), - Err(e) if allow_unknown_objects => { + Err(ref error @ Error::Git(ref message, _)) + if allow_unknown_objects + && message.contains("unknown revision or path") => + { warn!( "unable to detect git range, assuming all files have changed: {}", - e + error ); Ok(ChangedFiles::All) }