Carlos Martín Nieto
167666cd23
Listen to dialyzer
2013-11-30 20:43:19 +01:00
Carlos Martín Nieto
3110f37ff7
Wrap commit creation
2013-11-24 16:23:01 +01: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
c511675d59
Merge branch 'revparse'
2013-10-16 13:58:20 +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
21464aeece
Wrap git_revparse_single
2013-09-05 15:37:01 +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
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
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
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
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
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
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
52a6f72fef
Provide geef_tree:count/1
2013-07-24 23:55:54 +02:00
Carlos Martín Nieto
bf2a59dbf2
Fix some dialyzer warnings
2013-07-17 10:37:00 +02: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
9d222df593
Initial signature test
2013-06-11 16:34:02 +02:00
Carlos Martín Nieto
e8684471c0
Add ref shorthand function
2013-06-09 02:14:35 +02:00
Carlos Martín Nieto
042156d843
Bind ref name dwim
2013-06-07 17:55:16 +02:00
Carlos Martín Nieto
a0ded06b7a
Create a record for tree entries
2013-06-06 14:08:53 +02:00
Carlos Martín Nieto
267353ea21
Wrap the rest of the object modules in elixir
2013-06-06 11:14:57 +02:00
Carlos Martín Nieto
d21d2cb9b0
Keep an object's id in the record
...
We have the information there anyway, so don't make us allocate a new
binary every time.
2013-06-05 22:15:40 +02:00
Carlos Martín Nieto
133c1004ea
Rename the object module to geef_obj
...
This leaves us geef_object as the record to match against.
2013-06-05 21:42:16 +02:00
Carlos Martín Nieto
ac3d2d03fe
Rename the ref record to geef_reference
...
Remove the access hacks for elixir and make :geef_reference an elixir
macro as well.
2013-06-05 21:22:25 +02:00
Carlos Martín Nieto
370acd05ce
More correct spec for pkt
2013-06-05 00:33:11 +02:00
Carlos Martín Nieto
8eaad74c3a
Avoid going into the NIF for resolving an oid ref
2013-06-05 00:33:11 +02:00
Carlos Martín Nieto
369a2e5151
Add convenience geef_pkt:line([]) -> []
2013-06-02 00:02:11 +02:00
Carlos Martín Nieto
bd510de1e3
Also parse "done" lines
...
This works well for now, but if we're going to support
multi_ack_detailed at some point, we need a better way of parsing the
particular pkt.
2013-05-31 14:21:59 +02:00
Carlos Martín Nieto
3ec3c454c8
geef_object:type/1 helper for elixir
2013-05-30 03:50:45 +02:00
Carlos Martín Nieto
0e644be825
Add tag-peeling support
2013-05-30 03:39:51 +02:00
Carlos Martín Nieto
f410083711
Simplify the pkt parsing code
2013-05-28 19:45:37 +02:00
Carlos Martín Nieto
75e3d5416c
Better handling of flush, short lines
2013-05-28 17:57:45 +02:00
Carlos Martín Nieto
ecb7cdfc23
Parse protocol requests
2013-05-28 09:21:24 +02:00
Carlos Martín Nieto
03f43d3265
pkt: parse want and have lines
2013-05-27 12:55:04 +02:00
Carlos Martín Nieto
23baf9a8b0
Fix pkt-line length
2013-05-27 12:55:04 +02:00
Carlos Martín Nieto
dacbbbc20e
Add a simple protocol helper
2013-05-27 12:55:04 +02:00
Carlos Martín Nieto
2ebfc7b4d3
Complete the definition of the index_entry record
...
Most of the values are ignored, though
2013-05-27 12:55:04 +02:00
Carlos Martín Nieto
7b1dacffc7
Convert geef_odb to a gen_server
2013-05-23 10:58:11 +02:00
Carlos Martín Nieto
41113f3221
Rename geef_oid:fmt -> hex
2013-05-13 11:49:49 +02:00
Carlos Martín Nieto
604388a76d
Keep the reference name as part of the record
2013-05-13 11:46:12 +02:00