Commit Graph

236 Commits

Author SHA1 Message Date
Carlos Martín Nieto
3c9e429038 Remove old signature test 2013-10-16 14:23:03 +02:00
Carlos Martín Nieto
c511675d59 Merge branch 'revparse' 2013-10-16 13:58:20 +02:00
Carlos Martín Nieto
b930c1519f nif: add support for CFLAGS 2013-10-16 13:27:40 +02:00
Carlos Martín Nieto
05e1781356 More sensible signature functions
Remove all of the older functions. Bind git_signature_default() and
implement the _now() equivalent in erlang.
2013-10-15 22:31:13 +02:00
Carlos Martín Nieto
ec63e08780 Correctly identify which object type we're trying to transform 2013-09-05 15:37:01 +02:00
Carlos Martín Nieto
21464aeece Wrap git_revparse_single 2013-09-05 15:37:01 +02:00
Carlos Martín Nieto
72078cb099 Wrap ref creation in elixir 2013-09-04 01:16:50 +02:00
Carlos Martín Nieto
ee1d719ef4 Remove some dead code 2013-09-03 20:42:28 +02:00
Carlos Martín Nieto
0d24afb089 Get rid of the tagged OID
This means we no longer accept any iolist in some of the functions,
but we might bring it back later.

There is also a new function, geef_ref:create_symbolic() to create
symbolic references, since we can no longer differentiate between a
name and an OID.
2013-09-03 20:37:00 +02:00
Carlos Martín Nieto
a400d3ca85 Introduce an elixir OID type
This is still fairly experimental.
2013-09-02 20:10:56 +02:00
Carlos Martín Nieto
895041b2a7 tests: properly setup and teardown 2013-09-02 20:10:38 +02:00
Carlos Martín Nieto
8f9ca440d9 Fix geef_ref:resolve/1
We never updated what the NIF returns, and we were making a lookup too
many by trying to load the reference which we already have.
2013-09-02 20:08:58 +02:00
Carlos Martín Nieto
9e4826741c Add a tiny elixir test 2013-09-02 02:18:41 +02:00
Carlos Martín Nieto
5ada4fe0c1 Warp geef_index in elixir 2013-09-01 20:26:11 +02:00
Carlos Martín Nieto
15ba2dd65f Add support for index_entry's size field 2013-09-01 19:56:35 +02:00
Carlos Martín Nieto
e39a17fe43 Allow retrieval of index entries
This is still very basic, as we only actually load three fields into
the record.
2013-09-01 15:30:15 +02:00
Carlos Martín Nieto
808a8176bc Make dialyzer happy 2013-08-31 17:57:55 +02:00
Carlos Martín Nieto
fd171278a1 Merge branch 'pure-ref' 2013-08-31 17:34:48 +02:00
Carlos Martín Nieto
0bbb69122b Make sure to test geef_ref:resolve() 2013-08-31 17:34:24 +02:00
Carlos Martín Nieto
70867b9615 Keep references purely in erlang
Refernces contain three pieces of data which we already keep in the
erlang record. Keep the repository it belongs to in the record as well
and remove resource in the NIF. This makes the code easier to reason
about, as we don't need to keep any reference counts or GC the C
struct.

This does mean we cannot re-use references across geef_repo restarts,
but that's probably a good thing.
2013-08-31 17:23:46 +02:00
Carlos Martín Nieto
da7a070522 A refname is always a binary 2013-08-31 14:49:11 +02:00
Carlos Martín Nieto
b8f282a201 Adjust to some elixir changes 2013-08-31 14:44:48 +02:00
Carlos Martín Nieto
b04809ca59 Shuffle some types
Put types in the modules they belong to instead of including them in
each one from the header.
2013-08-31 14:43:25 +02:00
Carlos Martín Nieto
dea88e5a59 Don't overload the record constructors
Use 'from_erl' instead of 'new' when transforming erlang records into
elixir records.
2013-08-12 14:35:32 +02:00
Carlos Martín Nieto
bd83f2fb0e Create a copy of the iterator before turning it into a stream
A functional language shouldn't modify the iterator, but instead keep
advancing. As we can't stop in any particular point, we still just use
a stream.
2013-08-12 14:20:13 +02:00
Carlos Martín Nieto
4c63c08c50 Refactor reference costructor 2013-08-11 00:46:20 +02:00
Carlos Martín Nieto
1f7e41995b Allow streaming from an iterator 2013-08-10 20:44:28 +02:00
Carlos Martín Nieto
aaf6a3c6e3 Reference: get the constructor to work with new elixir as well 2013-08-10 20:00:07 +02:00
Carlos Martín Nieto
0e93508e80 Adjust to newer elixir
Calling Tree.new doesn't transform the record type any more.
2013-08-10 10:05:19 +02:00
Carlos Martín Nieto
19ff0dd7d5 Tree: raise an exception if we can't look up the tree 2013-08-10 06:30:49 +02:00
Carlos Martín Nieto
3a7d37bec8 Fix some dialyzer issues 2013-08-09 23:30:22 +02:00
Carlos Martín Nieto
bb35fce5cc Implement ref iterators 2013-08-09 23:25:55 +02:00
Carlos Martín Nieto
6e24413388 geef_ref: fix typo in shorthand 2013-08-09 18:27:08 +02:00
Carlos Martín Nieto
73f31eac2f Make dialyzer happy 2013-07-31 05:00:23 +02:00
Carlos Martín Nieto
5e0aba3458 Don't forget to compile the erlang files 2013-07-26 03:04:08 +02:00
Carlos Martín Nieto
0d1c0e8f8e Add documentation and defaults to the NIF compiler 2013-07-26 02:05:07 +02:00
Carlos Martín Nieto
bef56fd74c Check if the project exports a nif function 2013-07-26 01:06:13 +02:00
Carlos Martín Nieto
99b7108d74 Implement the Enumerable protocol for Tree 2013-07-25 00:15:47 +02:00
Carlos Martín Nieto
52a6f72fef Provide geef_tree:count/1 2013-07-24 23:55:54 +02:00
Carlos Martín Nieto
bed2e19ede Pass the args as a list to the compiler
Instead of converting into a string and hoping the shell doesn't
choke.
2013-07-24 23:41:22 +02:00
Carlos Martín Nieto
08ca3b33c2 Search through a list of compilers to compile the NIF 2013-07-23 13:54:39 +02:00
Carlos Martín Nieto
dea0eef8dc Compile the NIF directly
Instead of going through `rebar compile`, do it ourselves.
2013-07-22 03:40:40 +02:00
Carlos Martín Nieto
bf2a59dbf2 Fix some dialyzer warnings 2013-07-17 10:37:00 +02:00
Carlos Martín Nieto
ed6654fe59 Update README
Show more capabilities of the elixir part
2013-07-12 18:38:18 +02:00
Carlos Martín Nieto
ff4eb2301a Merge pull request #1 from edescourtis/master
R15B02 wasn't working (it's still very popular)
2013-06-19 13:55:25 -07:00
Eric des Courtis
8e9a64af9a Older versions of Erlang (R15B02) don't have erlang:binary_to_integer/2 2013-06-18 16:18:55 -04:00
Carlos Martín Nieto
328b2c4b4b Allow getting a tree entry by position 2013-06-12 02:34:53 +02:00
Carlos Martín Nieto
bd44d3f6b0 Oops: make sig tests pass 2013-06-12 02:19:21 +02:00
Carlos Martín Nieto
b671c5110e Implement Access for Geef.Tree
Make Geef.Tree its own record so we can define the protocol
implementation for it. There shouldn't be any generic functions you'd
want to call on a tree record.
2013-06-12 00:05:04 +02:00
Carlos Martín Nieto
2f20e18b56 Refactor elixir code
This should lead to better overview
2013-06-11 23:01:28 +02:00