diff --git a/ci/bin/generate-yaml.py b/ci/bin/generate-yaml.py
index d9b7f13a6721f163c1cb2fce8d1f504ee509f454..b5afa40a5ef1ee86e4bdc945253b60c18b264fd4 100755
--- a/ci/bin/generate-yaml.py
+++ b/ci/bin/generate-yaml.py
@@ -105,7 +105,7 @@ def main(argv):
         # Get list of files that have changed from commit SHA
         # git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA
         sp = subprocess.run(
-            ["git", "diff-tree", "--no-commit-id", "--name-only", "-r", f"{commit_sha}"],
+            ["git", "diff-tree", "-m", "--no-commit-id", "--name-only", "-r", f"{commit_sha}"],
             stdout=subprocess.PIPE,
             universal_newlines=True,
         )