Commit Graph

45 Commits

Author SHA1 Message Date
Carlos Martín Nieto
5362e0c4b6 Get rid of some warnings 2014-09-17 04:41:20 +02:00
Carlos Martín Nieto
ccc0cc1f80 Add some tests for Index
Including making the default :undefined, so the NIF doesn't get
upset. Implementing the Access protocol would require a struct, so we
may or may not want that.
2014-08-03 15:03:03 +02:00
Carlos Martín Nieto
fffdb47032 Make Reference call the NIF itself 2014-08-03 02:10:42 +02:00
Carlos Martín Nieto
808646a5ca Work towards elixir 14
While here, make the object be an elixir struct instead of delegating to
the erlang code.

As part of this, geef_nif:commit_tree() has been fixed to return the id,
insted of the type, as we know it's going to be a tree, but not then id.
2014-08-03 01:03:17 +02:00
Klaus Trainer
2b4e2eec01 Fix compilation errors with Elixir 0.13.0 2014-04-22 15:50:25 +02:00
Carlos Martín Nieto
167666cd23 Listen to dialyzer 2013-11-30 20:43:19 +01:00
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
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
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
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
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
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
b8f282a201 Adjust to some elixir changes 2013-08-31 14:44:48 +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
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
99b7108d74 Implement the Enumerable protocol for Tree 2013-07-25 00:15:47 +02: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
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
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
8244057d75 Use a macro to convert Geef.Object to :geef_object 2013-06-07 10:58:24 +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
f82f47c025 Wrap :geef_pkt with elixir 2013-06-06 10:42:22 +02:00
Carlos Martín Nieto
a80b7bc221 Use elixir names for elixir records
Follow the example set by elixir's use of FileInfo and use elixir-y
names for refs and objects, and convert them to :geef_reference and
:geef_object when we pass them down to erlang geef.
2013-06-06 01:48:15 +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
9f82af2ac3 Add odb and reference wrappers 2013-06-05 01:40:08 +02:00
Carlos Martín Nieto
21c5c8ca2d Add experimental elixir Geef.Repository wrapper 2013-06-05 00:57:19 +02:00