Carlos Martín Nieto
9ccf966c58
Merge branch 'create-commit'
2013-11-24 16:34:54 +01:00
Carlos Martín Nieto
568f9b2daf
Wrap commit creation in elixir
2013-11-24 16:34:08 +01:00
Carlos Martín Nieto
3110f37ff7
Wrap commit creation
2013-11-24 16:23:01 +01:00
Carlos Martín Nieto
a8078fba69
Commit: grab the tree
2013-10-26 02:44:05 +02:00
Carlos Martín Nieto
c2e64e7fc8
Fix typo
2013-10-17 10:29:13 +02:00
Carlos Martín Nieto
fd390306b3
Also alias Geef.Signature
2013-10-16 16:10:53 +02:00
Carlos Martín Nieto
6c272e2c30
index: write out all fields to disc
...
There is still now way to access what the flags mean, and the times
need to be in pure timestamp form, rather than erlang's.
Non-essential fields are allowed to be 'undefined' and then the
entry's field will remain zeroed.
2013-10-16 15:01:16 +02:00
Carlos Martín Nieto
179f424bb5
index: grab all of the fields from C-land
2013-10-16 14:23:38 +02:00
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