diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fb62b1063..da555a6187 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +#### 🐞 Fixes + +- Fixed a Git "fatal: bad object" error when submodules are in being used. + ## 1.30.0 #### 💥 Breaking @@ -47,7 +53,8 @@ - Fixed `moon project-graph ` not including all dependencies/dependents. It was only showing direct relationships. -- Fixed an issue where touched file paths would include Git submodule directories and trigger hasher warnings. +- Fixed an issue where touched file paths would include Git submodule directories and trigger hasher + warnings. #### ⚙️ Internal diff --git a/crates/app/src/commands/ci.rs b/crates/app/src/commands/ci.rs index 8a9ec4594c..af564570db 100644 --- a/crates/app/src/commands/ci.rs +++ b/crates/app/src/commands/ci.rs @@ -214,7 +214,7 @@ async fn generate_action_graph( let mut action_graph_builder = session.build_action_graph(workspace_graph).await?; action_graph_builder.set_touched_files(touched_files)?; - action_graph_builder.set_affected_scopes(UpstreamScope::Direct, DownstreamScope::Deep)?; + action_graph_builder.set_affected_scopes(UpstreamScope::Direct, DownstreamScope::Direct)?; // Run dependents to ensure consumers still work correctly action_graph_builder.run_from_requirements(RunRequirements { diff --git a/crates/vcs/src/git.rs b/crates/vcs/src/git.rs index 00ef9ed8e3..5a00dc952a 100644 --- a/crates/vcs/src/git.rs +++ b/crates/vcs/src/git.rs @@ -783,11 +783,15 @@ impl Vcs for Git { ) -> miette::Result { let mut touched_files = TouchedFiles::default(); - for result in futures::future::try_join_all( - self.modules - .values() - .map(|module| self.exec_diff(module, base_revision, revision)), - ) + // TODO: Revisit submodules + // https://github.com/moonrepo/moon/issues/1734 + for result in futures::future::try_join_all(self.modules.values().filter_map(|module| { + if module.is_root() { + Some(self.exec_diff(module, base_revision, revision)) + } else { + None + } + })) .await? { touched_files.merge(result);