From ed6654fe5959b5da71d2db4760a73db3b73a2376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Fri, 12 Jul 2013 18:38:18 +0200 Subject: [PATCH] Update README Show more capabilities of the elixir part --- README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index d978ba7..a7b031e 100644 --- a/README.md +++ b/README.md @@ -33,24 +33,25 @@ Workdir = geef_repo:workdir(Repo). Elixir ====== -There are wrappers for elixir which make use of some elixir-specific +Most functions are available from the elixir modules so you can make use of some elixir-specific things, like `Repository.open!`, or `Reference.resolve!`. ```elixir alias Geef.Repository alias Geef.Reference repo = Repository.open!(".") -ref = Reference.lookup!(repo. "HEAD") |> Reference.resolve! +ref = Reference.lookup!(repo, "HEAD") |> Reference.resolve! ``` -Of course, you could also do +references, objects, etc are elixir records. Trees implement the Access protocol ```elixir -ref = Repository.open! "." |> Reference.lookup! "HEAD" |> Reference.resolve! +Reference[name: name] = Reference.lookup!(repo, "refs/heads/master") +IO.puts name +{:ok, tree} = Tree.lookup(repo, "abcde...") +IO.inspect tree["src/geef_pkt.erl"] ``` -but then you would leak the repository process. - CONTRIBUTING ============== @@ -61,8 +62,8 @@ for the topic), send a pull request. AUTHORS ============== -Scott Chacon -Carlos Martín Nieto +* Carlos Martín Nieto +* Scott Chacon LICENSE