Commit Graph

85 Commits

Author SHA1 Message Date
Carlos Martín Nieto
0127730f6b Add geef_index:read_tree() 2013-04-26 14:34:15 +02:00
Carlos Martín Nieto
0a71085a40 Introduce geef_index 2013-04-26 11:47:40 +02:00
Carlos Martín Nieto
65227fe85b Move nif functions to geef_nif 2013-04-25 11:05:57 +02:00
Carlos Martín Nieto
54d9e8b63a Add lookup/2 to the specific types
They proxy to geef_object:lookup/3 which looks up the object and
asserts the type.
2013-04-22 02:13:24 +02:00
Carlos Martín Nieto
3adfa507c0 Fix geef_ref:lookup/2
Make use of the repo server intead of accepting a handle
2013-04-21 20:35:21 +02:00
Carlos Martín Nieto
353995a2da Properly stop the repo and revwalk servers
Return the 4-tuple when asked to stop instead of the 3-tuple so we do
indicate the stop was normal.
2013-04-10 20:11:07 +02:00
Carlos Martín Nieto
d0034b1142 Add a test for revwalk 2013-04-10 19:08:05 +02:00
Carlos Martín Nieto
7a1a079a5a Make revwalk a gen_server 2013-04-10 15:20:46 +02:00
Carlos Martín Nieto
4f507b8146 Make the repo a gen_server
This helps us make sure we only have one thread accessing a particular
repo at a time and hopefully help us be more in line with usual erlang
practices.
2013-04-06 18:34:02 +02:00
Carlos Martín Nieto
58aff1e129 Add revwalk support 2013-04-02 17:13:18 +02:00
Carlos Martín Nieto
011068f51c Expose reference_name_to_id 2013-04-02 07:30:02 +02:00
Carlos Martín Nieto
7de2b5f4b6 Return error messages as binaries 2013-04-02 06:29:07 +02:00
Carlos Martín Nieto
24c78039a8 Fix typo in README 2013-04-01 16:46:25 +03:00
Carlos Martín Nieto
5a3e0e0f34 Remove geef:hex_to_raw 2013-04-01 15:10:02 +02:00
Carlos Martín Nieto
f41ff25a59 Expose git_libgit2_version 2013-04-01 15:08:05 +02:00
Carlos Martín Nieto
c2d1acbbe6 Write a few docs 2013-03-31 23:17:51 +02:00
Carlos Martín Nieto
2dcd701c53 Implement a dummy upgrade function
We don't keep anything in priv, so there's nothing for us to do.
2013-03-31 22:24:20 +02:00
Carlos Martín Nieto
2d1d1456ec Bind repository discovery 2013-03-31 22:20:35 +02:00
Carlos Martín Nieto
29217c65fe Update README example API 2013-03-31 21:29:26 +02:00
Carlos Martín Nieto
aa1ba5bfa5 Have geef_odb:exists take an oid properly 2013-03-31 21:29:25 +02:00
Carlos Martín Nieto
8d7fbb1ec5 Add a couple more tests 2013-03-30 15:11:29 +01:00
Carlos Martín Nieto
d546274f8c Add geef_repo:odb 2013-03-30 15:11:13 +01:00
Carlos Martín Nieto
125e132af9 Add geef_odb:write 2013-03-30 15:11:05 +01:00
Carlos Martín Nieto
5ee6b055e9 tree: don't use a record for tree entry
Return the four elements directly
2013-03-28 13:32:20 +01:00
Carlos Martín Nieto
7987f35e58 Add a way to get a blob's size and content 2013-03-02 14:34:16 +01:00
Carlos Martín Nieto
c1660ec259 Add ebin/ and .enunit to the ignore rules 2013-03-02 12:43:17 +01:00
Carlos Martín Nieto
d0bdfecf4b Add a basic blob wrapper 2013-03-02 12:42:47 +01:00
Carlos Martín Nieto
94c5ece71c Makefile: make test depend on compile
Otherwise, the nif might not be up to date when you run 'make test'
2013-03-02 12:34:21 +01:00
Carlos Martín Nieto
9b2a053848 Add object id lookup 2013-03-02 03:27:40 +01:00
Carlos Martín Nieto
d62511515d Remove unused variable, remember to capitalise variables 2013-03-02 03:12:44 +01:00
Carlos Martín Nieto
361c9ddb27 Let geef_object:lookup also be an iolist 2013-03-02 03:10:42 +01:00
Carlos Martín Nieto
b5b68cce8b Allow getting a tree entry 2013-03-02 02:56:58 +01:00
Carlos Martín Nieto
1807ba4374 Don't shout every time the NIF is loaded 2013-03-01 19:59:00 +01:00
Carlos Martín Nieto
7471774558 Get rid of an unused var 2013-03-01 19:58:27 +01:00
Carlos Martín Nieto
2c7a984af0 Add a simple test in geef_oid 2013-03-01 01:54:07 +01:00
Carlos Martín Nieto
4c798629dd Export geef:commit_tree 2013-03-01 01:03:47 +01:00
Carlos Martín Nieto
b2e366027b Add geef_commit:tree() 2013-02-17 23:45:03 +01:00
Carlos Martín Nieto
134c052f71 Accept iolist in geef_oid:parse 2013-02-17 21:27:57 +01:00
Carlos Martín Nieto
6d34f99520 Add geef_commit:tree_id 2013-02-17 21:25:32 +01:00
Carlos Martín Nieto
d71c6ff702 Add a way to look up objects 2013-01-30 00:16:52 +01:00
Carlos Martín Nieto
ad567fbf41 erlang headers should be hrl 2013-01-29 01:46:11 +01:00
Carlos Martín Nieto
8a96f4732e Add the #oid{} record to differentiate from a formatted hash 2013-01-29 01:46:11 +01:00
Carlos Martín Nieto
5a58abc4a0 Let geef_ref:target/1 handle both oid and symrefs 2013-01-25 15:22:14 +01:00
Carlos Martín Nieto
78e0693b8a Add typespecs to the functions 2013-01-25 03:33:02 +01:00
Carlos Martín Nieto
3c6b1ddaf5 Use erlang:nif_error to make dialyzer happy
And mark some of the NIF functions
2013-01-25 03:06:29 +01:00
Carlos Martín Nieto
5ede846988 Accepts paths as iolists 2013-01-25 00:20:42 +01:00
Carlos Martín Nieto
4658251ced Let rebar generate the app file 2013-01-25 00:12:26 +01:00
Carlos Martín Nieto
b42a02b0c5 Get rid of unused variables 2013-01-24 23:57:02 +01:00
Carlos Martín Nieto
7d76f18a55 More complete ref bindings 2013-01-24 23:55:42 +01:00
Carlos Martín Nieto
468695adb5 reference_id -> reference_target 2013-01-24 23:36:17 +01:00