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.
- Fix issues introduced in prev commit
- Move all documentation for Repository.walk from log.rst to
pydoc in repository.c to make it available in both html and pydoc
- Extend documentation with sort types description
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.
Changes:
- (#203) Now Repository.head returns the resolved reference, not the
commit
- (#210) Fix refcount error in Repository.create_remote
- (#212) Improved diff documentation
Thanks to Jun Omae and Nico von Geyso.
Now Repository.head behaves like libgit2's git_repository_head, it
returns the resolved reference. These two lines are equivalent:
ref = repo.head
ref = repo.lookup_reference('HEAD').resolve()
Before it returned a commit.