Skip to content

Change.PatchContext: User-provided ctx timeout is not applied in filePatchWithContext, falls back to 1-hour diff execution #1911

@bitpeng

Description

@bitpeng

Bug Description

There is a hidden bug in the Change.PatchContext method: even when users call this function with a ctx that has a timeout of only a few seconds, filePatchWithContext always uses diff.Do(fromContent, toContent) — which has a one-hour execution timeout. This is extremely confusing for users. I've opened a pull request to fix this: 1910

go-git Version

5.16.2

Steps to Reproduce

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions