Avoid:
>>> repo.default_signature()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: '_pygit2.Signature' object is not callable
Add Repository.write_archive() to write a given tree to an archive. As
there are many customisation options, we only provide a method to write
to an archive which is created by the user.
This almost certainly isn't perfect, but it's a big step up and should
work on (at least) any 32-bit or 64-bit version of python2 or python3
running on Linux (rather than just 64-bit python2.7 on Linux).
Use the right namespace so Refspec and TransferProgress show up. These
classes are not instantiated by the user, so they were not promoted to
the pygit2 module. Use autoclass so it lists everything for us.
Also use autoclass for the reflog. We had a difference is oid vs id
between the docs and the code.
LIBGIT2_VERSION was previously recorded as LIBGIT2_VER_VERSION which is
incorrect.
We also add basic explanations to all the constants so that the page is
a little less bare. Perhaps this should be done as autodoc style
comments in the code but I guess not.
An index may not have an associated repository, so giving it an id in
that case is useless. Raise an error in that case and accept a Tree
object to make the function useful then.
Reconcile the changes between the ffi changes upstream with the changes
to libgit2 in the dev branch.
Conflicts:
src/config.c
src/options.c
src/refspec.c
src/remote.c
The keyword for linking to a mehtod is 'meth', not 'method'. Setting the
'currentmodule' allows us to link without the 'pygit2' prefix in the
link text.
Passing a tuple to the mapping interface isn't the best of interfaces,
as the key is only the string.
Instead, expose `Config.get_bool()` and `Config.get_int()` methods to
parse the values as per the git-config rules before returning the
appropriate type to the user.
The mapping interface itself returns a string.
The type of a config value depends on the tool that interprets
it. Parsing eagerly can lead to a situation where we return a bool
instead of a string or a number.
Let the user specify the type themselves by passing in a (str, type)
tuple into the mapping interface.