Skip to content
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

Group submodule functions under Repository.submodules #1250

Merged
merged 3 commits into from Nov 24, 2023

Conversation

jorio
Copy link
Contributor

@jorio jorio commented Nov 22, 2023

Following up on #1248 (comment), this PR implements a Submodules class that groups submodule functions in a Repository, much like Branches, References and RemoteCollection.

For backward compatibility, I turned the old functions into simple pass-throughs to the new class. Should we write unit tests for the deprecated versions?

@jdavid
Copy link
Member

jdavid commented Nov 23, 2023

Great @jorio

Could you please:

  • Remove submodule_status, submodule_cache_all and submodule_cache_clear ; these are new so no need to go through the deprecation process.
  • In add_submodule, init_submodules, lookup_submodule and update_submodules : call warnings.warn(...) ; see pygit2/repository.py line 323
  • Move the Submodules class to its own file submodules.py

Thanks!

@jdavid jdavid merged commit 719dd66 into libgit2:master Nov 24, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants