Initializers for the char * fields of the git_repository_init_options
structure must be cdata pointers.
Signed-off-by: Lukas Fleischer <info@cryptocrack.de>
libgit2 provides an initialization function to set sane defaults. Use
that instead of setting the version by hand, as that's not the only
thing it does.
Using C.git_clone_init_options() sets the checkout strategy to SAFE,
which will checkout the files after the clone, instead of the implicit
NONE which we're setting by hand.
This fixes #425,
We were missing a cast to bytes. Add a test for this option as well and
remove the old commented-out test for checkout_branch, which is
superseded by this one and whose last bit seemed confused about what the
option means.
This fixes #399
This halves the amount of code we have to take into account for dealing
with the config.
There is a slight change in the API. Config.get_multivar() returns an
iterator instead of a list, which lets us reuse code from the general
iterator and is closer to libgit2's API.
This moves enough code into python with CFFI to pass the test_remotes
unit tests. There is no credentials support yet.
There is a small change in the return value of Remote.fetch() in that we
now return a TransferProgress object instead of extracting a few values
into a dictionary.
It claims you need to checkout a branch after clone, which is not the
case currently (the clone function will do it for you).
While here, format the docstring for sphinx to make it pretty.
Even though I am aware that the comment lines in pygit2/__init__.py are longer than 79 characters, there's a reason for that.
If I break them, they'll show poorly in the documentation, and in my opinion better docs trump the 80 char requirement. If you think it's still better to have less than 80 characters in the comments, I'll gladly resubmit the changes at the expense of the documentation.
Moved the hardcoded version from setup.py to pygit2/version.py so
client software can figure out which version of pygit2 it's using.
Having setup.py import pygit2.version.__version__ removes duplication,
and also means that setup.py will always use the local version (and
not the version of a previously installed pygit2).