edk2-edkrepo icon indicating copy to clipboard operation
edk2-edkrepo copied to clipboard

clean up remote after faulty patchSet

Open ndhaller opened this issue 10 months ago • 1 comments

I have a patchSet that used a remote cherry-pick recipe in 2023 that became invalid in 2024 after a force push was made to the sourceRemote repo's sourceBranch. patchSet CherryPick:

<CherryPick sha="eaffa1d7ff915d5af484e5e230a4dde41e4b9a00..6cf31e9849f0ea2976fdcb08923c75d7e36ca526" sourceRemote="Edk2StagingRepo" sourceBranch="OpenSSL11_EOL" />

Error message during edkrepo checkout:

Error: Failed to cherry pick the commit eaffa1d7ff915d5af484e5e230a4dde41e4b9a00..6cf31e9849f0ea2976fdcb08923c75d7e36ca526

The issue is after the patchSet checkout failure, the remote repo was not removed, and causes a different error message for other patchSet that use the same remote:

Error: Failed to add the remote Edk2StagingRepo.

Workaround:
After a patchSet checkout failure involving a sourceRemote repo, use git to check for and remove remote that were not cleaned up by edkrepo.

git remote -v
Edk2StagingRepo https://github.com/tianocore/edk2-staging.git (fetch)
Edk2StagingRepo https://github.com/tianocore/edk2-staging.git (push)
git remote remove Edk2StagingRepo

ndhaller avatar Apr 15 '24 20:04 ndhaller