Commit Graph

234 Commits

Author SHA1 Message Date
Ramon Snir
1e48686aca fix Geef.Object.lookup 2015-07-31 21:49:52 +02:00
Ramon Snir
b2af788af0 some fixes from dialyzer output 2015-07-31 21:49:51 +02:00
Ramon Snir
f943274ad8 bug fix to commit create (when parents are given) 2015-07-31 21:49:51 +02:00
Ramon Snir
6c73d9e29e fix Geef.Signature for Elixir use 2015-07-11 07:50:25 +03:00
Ramon Snir
fa24599e82 Running mix should be sufficient, as an Elixir dependency 2015-07-11 07:50:25 +03:00
Carlos Martín Nieto
f75d7bbe63 Merge branch 'update-22' 2015-04-24 15:39:30 +02:00
Carlos Martín Nieto
4b889ed3bb Fix looking up a commit's tree
We were generating the term from the wrong object, meaning the system
was not keeping the object we should be. We were also not setting the
repository or increasing its refcount, meaning bad news when it came
time to GC the object.
2015-04-24 15:38:00 +02:00
Ramon Snir
906b58a2c8 Update to support libgit2 0.22 2015-04-24 15:33:36 +02:00
Carlos Martín Nieto
ad9acd2356 Allow retrieval of a commit message 2014-12-29 10:11:39 +00:00
Carlos Martín Nieto
e8b3b19d0d Use struct notation in the README example 2014-09-17 05:05:36 +02:00
Carlos Martín Nieto
3a48fb191e Fix reference resolving 2014-09-17 05:02:06 +02:00
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
Carlos Martín Nieto
3cafc28a35 Merge branch 'config' 2014-05-19 17:08:08 +02:00
Carlos Martín Nieto
8ade44a868 config: string get/set 2014-05-19 13:11:55 +02:00
Carlos Martín Nieto
4b0379f3ee config: expose get_bool/2 2014-05-19 12:55:12 +02:00
Carlos Martín Nieto
d6ad01836f config: another failing test 2014-05-19 12:50:53 +02:00
Carlos Martín Nieto
f568955a95 config: test for setting and getting bool 2014-05-19 12:40:55 +02:00
Carlos Martín Nieto
29d468c90a Add missing files 2014-05-19 12:15:14 +02:00
Carlos Martín Nieto
98b176c925 Add a minimum of config
This lets us revive the reflog test by letting us set
core.logallrefupdates to true.
2014-05-18 12:03:53 +02:00
Carlos Martín Nieto
688c052f6d Temporarily remove a test
libgit2 recently started caring about the reflog rules and as we use a
bare repo for testing, it does not append.
2014-05-18 11:19:15 +02:00
Carlos Martín Nieto
ee41214322 Merge pull request #2 from KlausTrainer/master
Fix compilation errors with Elixir 0.13.0
2014-04-22 16:37:14 +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
fcec57c84f Fix alloc_binary param order 2014-02-15 19:28:49 +01:00
Carlos Martín Nieto
fe4c72a811 Expose utility ref-type functions
These allow you to determine whether you're dealing with a branch, tag,
note or remote-tracking branch.
2014-02-15 01:38:33 +01:00
Carlos Martín Nieto
1a79093274 Get rid of a few dialyzer warnings 2014-02-14 00:51:06 +01:00
Carlos Martín Nieto
378c04284a Remove left-over debugging code 2014-02-14 00:07:43 +01:00
Carlos Martín Nieto
7b951fec74 Merge branch 'reflog' 2014-02-13 23:32:42 +01:00
Carlos Martín Nieto
73af429633 Add geef_reflog:delete() 2014-02-13 18:26:33 +01:00
Carlos Martín Nieto
5520efb72a Correct the signature output from the reflog
The function to convert signatures into erlang terms was returning ok
with the rest of the tuple which geef_sig expects. We do not want the
ok there, so let that function give us the four terms and decide what to
do in each case.

The signature functions still want to return with ok before it, but the
reflog wants them together with the other parameters.
2014-02-13 18:21:45 +01:00
Carlos Martín Nieto
22ab293910 Basic reflog support
For now it simply includes reading in the reflog as a list of
entries. This does mean that the drop/append functions don't need to be
wrapped, as we can use erlang's list handling.

It however also means that we cannot write this back out, as there is
currently no way to create an empty reflog that we can fill with our own
list.
2014-02-13 17:41:11 +01:00
Carlos Martín Nieto
d9822de604 Extract string->binary conversion 2014-02-13 16:36:10 +01:00
Carlos Martín Nieto
d4204b4b79 Extract signature conversion code 2014-02-13 16:32:46 +01:00
Carlos Martín Nieto
9501ed2377 Add reference has_log() 2014-02-13 14:53:19 +01:00
Carlos Martín Nieto
42d0aef29d Adjust to git_buf and oid->id changes 2014-02-13 14:51:24 +01:00
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
adadabdc26 Make sure to set flags to 0 on no option 2014-02-13 02:20:04 +01: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
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