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
bb35fce5cc
Implement ref iterators
2013-08-09 23:25:55 +02:00
Carlos Martín Nieto
042156d843
Bind ref name dwim
2013-06-07 17:55:16 +02:00
Carlos Martín Nieto
9f500e3fa0
Release binaries after creating writable copy
2013-06-04 23:37:03 +02:00
Carlos Martín Nieto
523b20d70a
ref: return {ok, Name} tuple for the name in the NIF
2013-05-27 12:55:04 +02:00
Carlos Martín Nieto
b79c606725
Remove references to ref type filtering
2013-05-27 12:55:04 +02:00
Carlos Martín Nieto
604388a76d
Keep the reference name as part of the record
2013-05-13 11:46:12 +02:00
Carlos Martín Nieto
616a358dc7
Prefer binary realloc to self-managed buffers
...
Use erlang's allocator and simplify the code by writing into the
buffer we're going to give back anyway.
Also introduce a function to NUL-terminate iolist buffers, which can
avoid memory copying.
2013-05-02 13:16:02 +02:00
Carlos Martín Nieto
ef7d2d5490
Return {error, enonmem} in OOM situations
2013-05-02 11:51:28 +02:00
Carlos Martín Nieto
0aa11d8532
Allow creation of refs
2013-05-02 06:24:15 +02:00
Carlos Martín Nieto
011068f51c
Expose reference_name_to_id
2013-04-02 07:30:02 +02: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
5ede846988
Accepts paths as iolists
2013-01-25 00:20:42 +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
Carlos Martín Nieto
7ac46fbf5e
Add reference_type()
2013-01-23 06:16:49 +01:00
Carlos Martín Nieto
71eea735d2
Add oid_parse(Sha)
2013-01-22 15:49:12 +01:00
Carlos Martín Nieto
880d7b76fb
reference: add id() to get the sha
2013-01-21 15:28:43 +01:00
Carlos Martín Nieto
2dcbb33b46
Update the bidindings
...
Make repository parametrized
2013-01-21 03:48:51 +01:00