From 5c2dd1da89bf482a858aac903be0734571924dc1 Mon Sep 17 00:00:00 2001 From: Michael Tautschnig Date: Tue, 18 Mar 2025 19:01:16 +0000 Subject: [PATCH] Subtree update automation: remove extraneous library folder This restores a fix from #250 that was deemed no longer necessary with the move to subtree split (in #270), but this proved to be wrong. (See https://github.com/model-checking/verify-rust-std/pull/275/commits/ab648fe7196e1016d22fac18bc80eabb17e6e5a8 for such an example of an unintended change.) --- .github/workflows/update-subtree.yml | 4 ++++ 1 file changed, 4 insertions(+) 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)