From a2618e6662f5f514309b3867a2b4c42a30a27569 Mon Sep 17 00:00:00 2001 From: AmoebaChant Date: Mon, 23 Feb 2026 11:00:46 -0800 Subject: [PATCH 1/2] Work around crlf issue --- .github/workflows/code-simplifier.lock.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/code-simplifier.lock.yml b/.github/workflows/code-simplifier.lock.yml index b7f4eac8236..a729dcc4ff9 100644 --- a/.github/workflows/code-simplifier.lock.yml +++ b/.github/workflows/code-simplifier.lock.yml @@ -1126,6 +1126,12 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + # Enable 3-way merge for git am to handle CRLF line ending mismatches. + # The repo uses '* -crlf' in .gitattributes, so files retain CRLF from Windows commits. + # git format-patch preserves CRLF in diff content, but git am strips it during + # mailbox parsing, causing context mismatch with the CRLF working tree. + # 3-way merge bypasses text matching by using blob SHAs instead. + git config --global am.threeWay true # Re-authenticate git with GitHub token SERVER_URL_STRIPPED="${SERVER_URL#https://}" git remote set-url origin "https://x-access-token:${GIT_TOKEN}@${SERVER_URL_STRIPPED}/${REPO_NAME}.git" From 06c5ac7e50b6496ba9bae4b74a814f188da52e0c Mon Sep 17 00:00:00 2001 From: AmoebaChant Date: Mon, 23 Feb 2026 11:45:47 -0800 Subject: [PATCH 2/2] fix attempt 2 --- .github/workflows/code-simplifier.lock.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/code-simplifier.lock.yml b/.github/workflows/code-simplifier.lock.yml index a729dcc4ff9..f2a91d33bee 100644 --- a/.github/workflows/code-simplifier.lock.yml +++ b/.github/workflows/code-simplifier.lock.yml @@ -1126,12 +1126,12 @@ jobs: run: | git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" - # Enable 3-way merge for git am to handle CRLF line ending mismatches. + # Preserve CRLF in patches during git am mailbox parsing. # The repo uses '* -crlf' in .gitattributes, so files retain CRLF from Windows commits. - # git format-patch preserves CRLF in diff content, but git am strips it during - # mailbox parsing, causing context mismatch with the CRLF working tree. - # 3-way merge bypasses text matching by using blob SHAs instead. - git config --global am.threeWay true + # git format-patch preserves CRLF in diff content, but git am's mailbox parser + # strips \r from all lines, causing context mismatch with the CRLF working tree. + # am.keepcr=true tells git-mailsplit to preserve \r, so CRLF diff matches CRLF files. + git config --global am.keepcr true # Re-authenticate git with GitHub token SERVER_URL_STRIPPED="${SERVER_URL#https://}" git remote set-url origin "https://x-access-token:${GIT_TOKEN}@${SERVER_URL_STRIPPED}/${REPO_NAME}.git"