tianocore / edk2-edkrepo

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

clean up remote after faulty patchSet #232

Open ndhaller opened 4 months ago

ndhaller commented 4 months ago

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 commented 2 months ago

Related pull request:

https://github.com/tianocore/edk2-edkrepo/pull/257