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.
It seems I have been forgetting to update the documentation with the
last few changes, so adjust to the oid -> id renaming and add missing
attributes to the listings.
This allows for efficient reading of many references and their targets,
without incurring the overhead of lookup_reference() (which stats for
a loose ref and then reads packed-refs) which can be expensive on NFS
with thousands of refs.
API changes:
- Rename Commit._message to Commit.raw_message
- Rename Signature._name to Signature.raw_name
- Rename Signature._email to Signature.raw_email
New features:
- Remote.push(refspec)
- Tag.get_object()
And some bugs fixed.
Thanks to Brodie Rao, Fraser Tweedale, Andrew Chin and Carlos Martín
Nieto.
Implement push support via Remote.push which is called with a single
refspec and raises GitError (with an appropriate message where
possible) if the push fails.
Note that local push to non-bare repository is currently not
supported by libgit2.
API changes:
- New Oid type
- Changed signature of Repository.create_reference
- Reference.oid and Reference.hex removed, use Reference.target instead
- Drop "del Index[path]" from the API, use Index.remove(path) instead
- Drop TreeEntry.to_object
- Changed signature of Repository.checkout
- Repository.create_blob_from_file removed, use instead new methods
Repository.create_blob_fromworkdir and
Repository.create_blob_from_disk
New features:
- Add len(TreeBuilder) and TreeBuilder.get
- Add Repository.merge_base
- Support changing the head with "Repository.head = refname"
- Improved support for diff
- Add support for clone
- Python 2: Support hex oids as byte strings
- Add Reference.get_object()
- Add Remote.save
- Add support for branches, new type Branch
Other:
- Upgraded to libgit2 0.19
- Partial documentation review
Thanks to Nico von Geyso, Daniel Rodríguez Troitiño, Bernardo Heynemann,
Rémi Duraffort, Andrey Devyatkin, Hervé Cauwelier, Jiunn Haur Lim, Richo
Healey, Carlos Martín Nieto, David Fischer, Fraser Tweedale, Jun Omae
and Xu Tao.