From: Gereon Kremer Date: Wed, 2 Jun 2021 06:29:02 +0000 (+0200) Subject: Do manual squash cleanup for docs (#6646) X-Git-Tag: cvc5-1.0.0~1664 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=444487219984b510bfe8c95c25fd8d28466551d5;p=cvc5.git Do manual squash cleanup for docs (#6646) This PR abandons the attempt to do the cleanup in a single rebase command, and instead squashes the old commits manually. The current solution does not handle conflicts properly. The new approach (which seems to be more robust) proceeds as follows (to squash $first..$last): - checkout $last - soft reset to $first (checkout $first, but keep changes in working copy) - commit to squashed commit - cherry-pick $last..HEAD from main branch --- diff --git a/.github/workflows/docs_cleanup.yml b/.github/workflows/docs_cleanup.yml index f56a0f595..761736e75 100644 --- a/.github/workflows/docs_cleanup.yml +++ b/.github/workflows/docs_cleanup.yml @@ -36,6 +36,7 @@ jobs: touch -d "$mod" $file done find ./ -maxdepth 1 -name "docs-*" -mtime +7 -exec git rm -r {} + + find ./ -maxdepth 1 -name "docs-*" -xtype l -exec git rm {} + git commit -m "Prune docs" || echo "Nothing to prune" - name: Squash old commits @@ -47,7 +48,10 @@ jobs: first=`git rev-list --max-parents=0 HEAD` last=`git rev-list --until=1.month.ago -n1 HEAD` if [ -n "$last" ]; then - git rebase -Xtheirs --onto $first $last + git checkout $last + git reset --soft $first + git commit -m "Squash old history" + git cherry-pick $last..main git log fi @@ -66,4 +70,4 @@ jobs: git commit -m "Update README.md" fi - git push -f + git push -f origin HEAD:main