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.
The current documentation text seems to be very confused about what a
remote-tracking branch is and what the relationship to an upstream is.
Correct the text to talk about the upstream branch when dealing with the
upstream configuration, instead of implying that it's related to the
setup of remote-tracking branches.
libgit2's development now happens on the master branch, which means we
can't use it to refer to the latest release. Download v0.21.0 explicitly
instead.
We switch to a parameter list for both functions and add a return type.
We also remove the indentation from the second line of the explanation
which was causing Sphinx to return it as two lines instead of one
continuous one.
We also added return types.
I am not sure of the type of the GIT_DIFF* flags so I have not included
that.
It might seem like a really obvious point to make but without
emphasizing it, it isn't completely clear. I would like to mention this
in the Branch section as well for how to point a branch at another
commit but I can't see how to smoothly slide it in.
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.
Renaming a remote in pygit2 has been done via Remote.name= up to now,
but this is inherently unsafe, as it provides no way to pass up the
refspecs that libgit2 was unable to remap.
In fact, if there ever was such problem, we would have segfaulted.
libgit2 now provides a much more direct way of getting back the results,
so expose it as the return value of Remote.rename(). This also removes
the hint that a rename might be something that happens only to the
in-memory structure.
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