Skip to content

Backport failing with "Patch format detection failed." in git am #16331

@jjonescz

Description

@jjonescz

Seen recently in several backports that don't have any conflicts. Example (https://github.com/dotnet/roslyn/actions/runs/19525506093/job/55897503610):

Verified jjonescz has write access to the repo.
/usr/bin/git ls-remote --exit-code --heads origin release/dev18.0
6c4a46a31302167b425d5e0a31ea83c9a9aa1d09	refs/heads/release/dev18.0
Backport target branch: release/dev18.0
Applying backport patch
/usr/bin/git checkout release/dev18.0
Switched to a new branch 'release/dev18.0'
branch 'release/dev18.0' set up to track 'origin/release/dev18.0'.
/usr/bin/git clean -xdff
/usr/bin/git config user.name github-actions
/usr/bin/git config user.email github-actions@github.com
/usr/bin/git checkout -b backport/pr-81341-to-release/dev18.0
Switched to a new branch 'backport/pr-81341-to-release/dev18.0'
/usr/bin/git ls-remote --exit-code --heads origin backport/pr-81341-to-release/dev18.0
/usr/bin/curl -sSL https://github.com/dotnet/roslyn/pull/81341.patch --output changes.patch
/usr/bin/git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Patch format detection failed.
Error: git am failed, most likely due to a merge conflict.

Doing an unauthenticated github request seems a bit suspicious, perhaps it's failing due to rate limits? Might help diagnosing this issue if the patch content file is written out into the logs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions