Skip to content

submodule: reimplement with Python CFFI.#514

Merged
jdavid merged 1 commit intolibgit2:masterfrom
pks-t:submodule_type_fix
Apr 18, 2015
Merged

submodule: reimplement with Python CFFI.#514
jdavid merged 1 commit intolibgit2:masterfrom
pks-t:submodule_type_fix

Conversation

@pks-t
Copy link
Copy Markdown
Member

@pks-t pks-t commented Apr 16, 2015

The submodule type has been implemented as a C type. When opening
a submodule's repository this leads to the bug that instead of an
actual pygit2.Repository being instantiated we only create an
object of the C Repository type.

As this is not trivially fixed within the C code, reimplement the
submodule type as a Python interface with CFFI. As submodules
provide no functionality that is usually accessed repeatedly the
code paths should not prove performance critical. In addition,
maintainability is improved by this reimplementation.

This PR is equivalent to the first commit of PR #513 with fixes for Python 3 compatibility. I'll create another PR for write support as soon as libgit2/libgit2#2999 is merged, which also fixes the issue that occured for the two other commtis.

The submodule type has been implemented as a C type. When opening
a submodule's repository this leads to the bug that instead of an
actual pygit2.Repository being instantiated we only create an
object of the C Repository type.

As this is not trivially fixed within the C code, reimplement the
submodule type as a Python interface with CFFI. As submodules
provide no functionality that is usually accessed repeatedly the
code paths should not prove performance critical. In addition,
maintainability is improved by this reimplementation.
@jdavid jdavid merged commit f923e20 into libgit2:master Apr 18, 2015
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.

2 participants