Skip to content

Commit

Permalink
chore(sync-noir): fix modify/delete conflicts automatically (#8090)
Browse files Browse the repository at this point in the history
Truly fulfill '-X theirs' with https://stackoverflow.com/a/54232519
  • Loading branch information
ludamad authored Aug 20, 2024
1 parent 7595d91 commit a09627c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/pull-noir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ jobs:
# Fix PR branch
git fetch # see recent change
git checkout $BRANCH || git checkout -b $BRANCH
git merge -Xtheirs origin/$STAGING_BRANCH -m "$COMMIT_MESSAGE"
if ! git merge -Xtheirs origin/$STAGING_BRANCH -m "$COMMIT_MESSAGE" ; then
# resolve modify/delete conflicts
git diff --name-only --diff-filter=U | xargs git rm
git commit -m "$COMMIT_MESSAGE"
fi
git push origin $BRANCH
}
force_sync_staging
Expand Down

0 comments on commit a09627c

Please sign in to comment.