-
-
Notifications
You must be signed in to change notification settings - Fork 399
Add init_submodules and update_submodules interfaces #692
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
Odd - the unit tests for submodules all work without error for me on my local machine. I'm uncertain why the unit tests are reporting the construction of the git repositories is failing - if there's any insight as to what may be causing those errors, I'm happy to resolve them. |
If I execute the submodule units tests as a standalone unit (e.g. I've also introduced the flag to allow automatically initializing submodules when executing an update command. |
Hi Jason, thanks for contributing. I don't know about the unexpected data at the end of the pack errors, maybe @carlosmn has a clue. Could you please handle the Windows errors shown in AppVeyor? |
Compiling under Visual Studio 10 has been fixed - it turns out the C support under Visual Studio 10 requires all variable declarations at the start of the function, which is different than the other compilers (Is Visual Studio 10 using the C89 standard as opposed to the C99 standard?) |
Yes, as far as I know VS is stuck with C89. |
Building under Visual Studio 10 works now, though the tests still fail with the mysterious unexpected data error. |
I got the same errors locally. So eventually I will look into them, when I find some time. |
I asked in the libgit2 Slack for help to make sure I wasn't making calls in an obviously incorrect fashion, but no one there had any major insights into the issue yet. I'm willing to chase down possible leads, but right now I'm at a bit of a loss. |
Please rebase over the master branch, the tests should pass now. Otherwise, cloning pygit2 from github makes the tests very slow; it would be nice to clone from the local disk instead. Also, since this feature is not performance sensible it is good candidate to be implemented with cffi, maybe you want to try. |
I had initially attempted to use local repositories for submodules, but ran into errors attempting to operate on the relevant submodules. I don't happen to have the relevant errors on hand, since I resolved them by using a remote submodule. What were the underlying issues that were interacting with this PR? It looks like there were issues related to running tests in sequence and side effects? I'm not terribly familiar with writing interfaces using cffi - are there any decent tutorials or examples in the repository I can look at? I've spent a bit of time poking around a few files that appear to use it, but it doesn't seem as obvious as I would hope. I can see some of how to access/create C objects through CFFI, but I have no insight on how to implement callback functions. |
The A number of features in pygit2 are implemented with cffi already. Anyway this is not a requirement for merging. |
0.26.0 (2017-07-06) ------------------------- - Update to libgit2 v0.26 `#713 <https://github.com/libgit2/pygit2/pull/713>`_ - Drop support for Python 3.2, add support for cffi 1.10 `#706 <https://github.com/libgit2/pygit2/pull/706>`_ `#694 <https://github.com/libgit2/pygit2/issues/694>`_ - New ``Repository.revert_commit(...)`` `#711 <https://github.com/libgit2/pygit2/pull/711>`_ `#710 <https://github.com/libgit2/pygit2/issues/710>`_ - New ``Branch.is_checked_out()`` `#696 <https://github.com/libgit2/pygit2/pull/696>`_ - Various fixes `#706 <https://github.com/libgit2/pygit2/pull/706>`_ `#707 <https://github.com/libgit2/pygit2/pull/707>`_ `#708 <https://github.com/libgit2/pygit2/pull/708>`_ 0.25.1 (2017-04-25) ------------------------- - Add suport for Python 3.6 - New support for stash: repository methods ``stash``, ``stash_apply``, ``stash_drop`` and ``stash_pop`` `#695 <https://github.com/libgit2/pygit2/pull/695>`_ - Improved support for submodules: new repository methods ``init_submodules`` and ``update_submodules`` `#692 <https://github.com/libgit2/pygit2/pull/692>`_ - New friendlier API for branches & references: ``Repository.branches`` and ``Repository.references`` `#700 <https://github.com/libgit2/pygit2/pull/700>`_ `#701 <https://github.com/libgit2/pygit2/pull/701>`_ - New support for custom backends `#690 <https://github.com/libgit2/pygit2/pull/690>`_ - Fix ``init_repository`` crash on None input `#688 <https://github.com/libgit2/pygit2/issues/688>`_ `#697 <https://github.com/libgit2/pygit2/pull/697>`_ - Fix checkout with an orphan master branch `#669 <https://github.com/libgit2/pygit2/issues/669>`_ `#685 <https://github.com/libgit2/pygit2/pull/685>`_ - Better error messages for opening repositories `#645 <https://github.com/libgit2/pygit2/issues/645>`_ `#698 <https://github.com/libgit2/pygit2/pull/698>`_
This exposes the ability to initialize and update submodules on a repository, which are useful for accessing files in submodules (or being able to use files in a repository which rely on submodule files.)