-
-
Notifications
You must be signed in to change notification settings - Fork 430
Abstract git backend (wrap pygit2) #2806
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
phw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly straight forward conversion of the API to the abstraction. Looks good to me, even if it is a lot of code and github has trouble showing everything.
I just wonder whether we should remove the code that tries to handle the case that no git backend is available. I don't think this is currently working as expected.
Git is used at so many places both in plugin.py and manager.py that it is unclear how and what should even work without the git code. The factory provides has_git_backend, but the implementation contradicts the pygit2 implementation.
In plugin.py there is a comment "Git backend will handle availability check", but I'm unsure what actually would happen if it is not available.
067e596 to
5586368
Compare
If we have no git backend, I guess we should totally disable plugins since they depend on it. |
Since previous commit: - Implement complete git backend abstraction layer (GitBackend, Pygit2Backend) - Replace all direct pygit2 usage with backend interface throughout codebase - Optimize remote fetching to target 'origin' remote specifically instead of all remotes - Migrate all tests to use git backend helper functions for consistency - Fix commit.oid -> commit.id for pygit2 API compatibility - Add proper error handling with GitBackendError hierarchy - Simplify remote fetching logic by removing unnecessary fallbacks - Add git backend singleton reset between tests for proper isolation New debug option: - Add GIT_BACKEND debug flag to log git backend method calls for troubleshooting
A command like: `picard -d --debug-opts git_backend plugins --validate https://git.sr.ht/\~phw/picard-plugin-xqaf` will show debug log
Summary
Problem
Solution
Action
Additional actions required: