Commit Graph

22 Commits

Author SHA1 Message Date
Carlos Martín Nieto
bb726f90a0 Adjust to reference signature changes
For now we don't use anything significant for the reflog.
2014-02-13 10:50:40 +01: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
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