93 Commits

Author SHA1 Message Date
J. David Ibáñez
eedd975bc8 Fix compilation warnings, remove unused variables v0.13.0 2011-06-25 18:53:22 +02:00
J. David Ibáñez
215893328c Fix issue #22, pygit2 compiles again with Python 2.5 2011-06-25 18:46:07 +02:00
J. David Ibáñez
7e8da54569 Update to libgit2 v0.13.0 2011-06-20 16:04:52 +02:00
Carlos Martín Nieto
64b20305e6 Use newer API 2011-06-16 22:48:42 +02:00
J. David Ibáñez
f8e61de973 Optimize index iterator, refactor code v0.12.0 2011-05-11 18:03:50 +02:00
J. David Ibáñez
f55b001db9 Fix index iterator test 2011-05-11 17:18:23 +02:00
J. David Ibáñez
87617e97a9 Merge remote branch 'zoranzaric/README' 2011-05-11 11:04:17 +02:00
J. David Ibáñez
fafeace94a Merge remote branch 'jflatow/dev' into development 2011-05-10 18:47:53 +02:00
Jared Flatow
b7fe1f90d0 added script to obviate nasty memory leak in Index_getitem 2011-05-10 08:18:35 -07:00
Jared Flatow
9dfc40e3f3 added iterator to index objects 2011-05-10 08:18:35 -07:00
J. David Ibáñez
22b6d44749 Update to libgit2's changes: strerror -> lasterror 2011-05-10 15:45:52 +02:00
Zoran Zaric
1a71745196 Remove trailing spaces from README 2011-05-09 13:43:38 +02:00
Zoran Zaric
dd86fbe048 Fix spelling mistake in README 2011-05-09 13:43:09 +02:00
J. David Ibáñez
8ad5e30eda Update maintainer in the setup file 2011-05-05 19:55:04 +02:00
J. David Ibáñez
51e6cdfd5d Replace internal function wrap_object by lookup_object
The new function does a little more, saving some lines from the callers.

This change will allow to implement a cache, now all object lookups are
centralized in a single function.
2011-05-05 19:33:05 +02:00
David Versmisse
bed8c13757 Add the "getters" Repository.path and Repository.workdir 2011-04-29 09:21:01 +02:00
David Versmisse
858adab759 Implement the References (part II) 2011-04-28 10:25:37 +02:00
David Versmisse
aac4cf1b86 Implement the References (part I) 2011-04-15 11:09:20 +02:00
J. David Ibáñez
713b14d2ee Support updating reference in create_commit 2011-04-11 19:23:48 +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
32acbc0f71 Set Python error when Commit_init fails 2011-04-08 18:37:32 +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
7947c5396c tests: remove unneeded calls to Index.read
Since libgit2's commit 3bdc0d4c8c3a5 the index file is automatically
read when opened.
2011-04-08 16:35:20 +02:00
J. David Ibáñez
c7ea728ca5 Merge remote branch 't3/master' into development 2011-04-07 16:36:13 +02:00
J. David Ibáñez
8491568dd0 Fix compilation warnings 2011-04-07 16:31:21 +02:00
Sarath Lakshman
014388c995 Add unit test for method create_tree() from Index class 2011-04-07 14:07:48 +05:30
Sarath Lakshman
e7fe537626 Add create_tree method for Index class
Invoke tree = index.create_tree() to create a tree from index file and return Tree object.
2011-04-07 14:02:57 +05:30
J. David Ibáñez
fca3a4753b Fix Tree_contains, forward Python errors 2011-04-06 13:03:38 +02:00
J. David Ibáñez
08d3dcc82e Update unit tests 2011-04-05 12:37:26 +02:00
J. David Ibáñez
8bbc75148f Add the parents param to the Commit init method
And fix unit tests for the commit object.
2011-04-05 11:22:56 +02:00
J. David Ibáñez
d395a2963e Updating to libgit2 v0.11.0 (work in progress)
"import pygit2" works again, but the tests do not yet pass
2011-04-01 19:07:47 +02:00
J. David Ibáñez
aa2982b687 Updating to libgit2 v0.11.0 (work in progress) 2011-03-31 19:06:10 +02:00
J. David Ibáñez
6c7df765c1 Fix typo: git_object => git_blob 2011-03-18 12:18:17 +01: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 Ibáñez
8abb9007c9 Start the documentation 2011-03-08 19:02:50 +01:00
J. David Ibáñez
b419bd0550 README: we support Python 2.5 too 2011-03-08 18:39:10 +01:00
J. David Ibáñez
89033ebc76 Merge remote branch 'john/fix-link' 2011-03-08 18:32:23 +01:00
J. David Ibáñez
204c0595f1 Add function 'init_repository' 2011-03-07 19:37:38 +01:00
J. David Ibáñez
2b84b37384 Give access to the path of an index entry 2011-03-07 17:06:42 +01:00
J. David Ibáñez
29a754bf43 Make pygit2 build against new libgit2 API
Now libgit2 uses reference counting for Git objects.
2011-03-04 12:05:53 +01:00
J. David Ibáñez
a1e79ded4e Merge remote branch 'davidv/index' 2011-03-03 19:52:32 +01:00
J. David Ibáñez
8da3f16da7 Merge remote branch 'john/add-commit-attributes' into revwalk
Conflicts:
	pygit2.c
	test/test_commit.py
2011-03-03 16:24:30 +01:00
J. David Ibáñez
3e45a68371 Add missing closure to the Commit.tree getseter 2011-03-03 16:20:35 +01:00
John Szakmeister
5b967f1a9d Turn the link to libgit2 into an actual link. 2011-02-27 08:42:24 -05:00
John Szakmeister
f94028fc4d Fix a stylistic nit. 2011-02-27 07:02:26 -05:00
John Szakmeister
2acf49c6f7 Support adding parents to a commit. 2011-02-27 07:01:33 -05:00
John Szakmeister
fd327d76e0 Uncomment a few tests. 2011-02-27 06:31:53 -05:00
John Szakmeister
3fc9a840a1 Add the parents attribute to commit.
Only support getting the attribute for now.
2011-02-26 16:31:15 -05:00
John Szakmeister
3b403247d1 Add a test for the sha of a commit. 2011-02-26 16:14:14 -05:00
J. David Ibáñez
b050de2b26 Make TreeEntry not to inherit from Object
Tree entries are not Git objects like commits, blobs, etc.

By inheriting from Object it was even possible to produce a segfault
when accessing inherited attributes like 'type'.
2011-02-23 19:01:57 +01:00