diff --git a/.github/workflows/update-subtree.yml b/.github/workflows/update-subtree.yml index e3c07a240d7f5..94a4f4b5327eb 100644 --- a/.github/workflows/update-subtree.yml +++ b/.github/workflows/update-subtree.yml @@ -117,6 +117,10 @@ jobs: git remote add rust-filtered ../rust-tmp/ git fetch rust-filtered git checkout -b subtree/library rust-filtered/subtree/library + # The checkout still leaves behind the library folder with submodules. + # We need to remove this as we'd otherwise have the create-pull-request + # action create an extra commit. + rm -rf library SUBTREE_HEAD_MSG=$(git log --format=%s -n 1 origin/subtree/library) UPSTREAM_FROM=$(git log --grep="${SUBTREE_HEAD_MSG}" -n 1 --format=%H rust-filtered/subtree/library) UPSTREAM_HEAD=$(git log --format=%H -n 1 rust-filtered/subtree/library)