tianocore / edk2-edkrepo

Repository for the edkrepo utility
Other
21 stars 24 forks source link

PatchSet with Patch followed by CherryPick can result in PatchSet failure. #244

Closed ndhaller closed 2 months ago

ndhaller commented 4 months ago

Create a patch file to resolve a cherry-pick merge conflict. Create an edkrepo PatchSet with Patch followed by CherryPick. Attempt to checkout a Combination that uses the PatchSet. PatchSet creation fails with error:

Error: Failed to cherry pick the commit *

The CR in the patch file is removed during the git am --ignore-whitespace call. The expected CR missing causes the git cherry-pick -x call to fail.

For a PatchSet Patch, include an optional setting to add --keep-cr during the git am --ignore-whitespace call.

For a PatchSet Revert and CherryPick, include an optional setting to override merge strategies to a few non-default configurations: e.g. --strategy ort --strategy-option ignore-all-space --strategy ort --strategy-option ours --strategy ort --strategy-option theirs

ndhaller commented 4 months ago

Since am.keepcr is a git configuration, maybe the CherryPick mergeStrategy option can handle the issue more consistently.