19 Commits

Author SHA1 Message Date
J. David Ibáñez
edcd803e7e Remove the __authors__ var from py files 2012-07-18 12:12:04 +02:00
J. David Ibáñez
6195491596 Add/update copyright header of each file
And update my email address.
2012-07-18 12:07:17 +02:00
J. David Ibáñez
d27cf0b687 style: remove trailing white-spaces 2012-06-18 11:22:56 -03:00
J. David Ibáñez
4b0f759cc0 Tag.target now returns the oid (not the object) 2012-02-27 00:13:43 +01:00
J. David Ibáñez
9064b8e038 Introduce the Signature object 2011-11-23 23:48:41 +01:00
Hugh Cole-Baker
160cf64abc Add support for using short hex string prefixes
Allows Repository_getitem, Repository_read(_raw), Repository_create_commit,
Repository_create_tag and Object_read_raw to use short hex strings to
lookup objects.
Also test getting objects from Repository using prefixes, looking up commit
trees and parents by hex prefix, and looking up tag targets by prefix.
Also stop raising TypeError if passing a too-short hex prefix to the
lookup functions, instead use ValueError.
2011-10-22 22:01:16 +01:00
J. David Ibáñez
73af642b8f tags: properly dealloc tags
There were two memory leaks: we were not closing the git_tag object,
and we were not decreasing the refcount on the repo.

This finishes fixing issue #20
2011-10-18 11:27:32 +02:00
J. David Ibáñez
83642a6954 Rename '.sha' to '.hex' 2011-09-02 16:53:17 +02:00
J. David Ibáñez
f09a02a2ee Use UTF-8 encoding in all Python files 2011-08-24 07:42:05 +02:00
J. David Ibáñez
fd5aab4e56 tests: minor coding style fix, use 4 spaces indent 2011-08-24 07:32:21 +02:00
J. David Ibáñez
b84b79acd8 Fix running the tests with Python 3
Now "python3 setup.py test" works.
2011-08-24 00:07:20 +02:00
J. David Ibáñez
7950ee1116 Use Python 3 string literals for the unit tests
Now unit tests are broken.
2011-08-13 22:48:23 +02:00
J. David Ibáñez
b634a19bd4 Update to latest changes in libgit2
Commit.message_short removed, Commit.message_encoding added
2011-08-13 20:36:37 +02:00
J. David Ibáñez
6f2b864619 Change API to create Git objects
Do not allow to create commits, trees, blobs and tags directly from the
constructor. For instance, now calling "Commit(...)" raises an error.
Instead use the create methods of the repository object:

  Before                         Now
  -----------------------------  -----------------------------
  commit = Commit(repo, ...)     sha = repo.create_commit(...)
  tag = Tag(repo, ...)           sha = repo.create_tag(...)

Most often you won't need to get the object just created, but if you
do just call "repo[sha]" afterwards. (Methods to create blobs and trees
are still missing, just like before.)

Similarly the method that creates a tree object from the index file does
not return the tree object anymore, but just its SHA:

  Before                         Now
  -----------------------------  -----------------------------
  tree = index.create_tree()     sha = index.create_tree()
2011-04-11 18:44:49 +02:00
J. David Ibáñez
43ea66b738 Add support for the time offset of the signature 2011-04-08 17:03:41 +02:00
J. David Ibáñez
08d3dcc82e Update unit tests 2011-04-05 12:37:26 +02:00
J. David Ibáñez
c411fd8203 Make pygit2 build against new libgit2 API
There is an small change to the API, the 'tag.target_type' getter has
been removed, just use 'tag.target.type' instead.
2011-03-15 15:29:55 +01:00
J. David Ibañez
fe1540f546 Add index test case for a non-bare repo 2011-02-07 13:28:39 +01:00
Dave Borowitz
e077abe1a6 Add Tag class.
Change-Id: Ia7240e96dd6da69d373f385bde67e8d3aa70f7b1
2010-11-12 13:22:10 -08:00