Skip to content

Commit 50630f8

Browse files
committed
Fix merge step
1 parent 6b53f15 commit 50630f8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/update-subtree.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,15 @@ jobs:
141141
if: ${{ env.MERGE_CONFLICTS != 'noop' && env.MERGE_PR_EXISTS == 'no' }}
142142
run: |
143143
cd verify-rust-std
144+
if ! git rev-parse --verify subtree/library; then
145+
git checkout -t -b subtree/library origin/update-subtree/library
146+
fi
144147
git checkout main
145148
146149
# This command may fail, which will require human intervention.
147150
if ! git \
148151
-c user.name=gitbot -c user.email=git@bot \
149-
subtree merge --prefix=library update-subtree/library --squash; then
152+
subtree merge --prefix=library subtree/library --squash; then
150153
echo "MERGE_CONFLICTS=yes" >> $GITHUB_ENV
151154
git -c user.name=gitbot -c user.email=git@bot commit -a -m "Merge from $NEXT_COMMIT_HASH with conflicts"
152155
else

0 commit comments

Comments
 (0)