Fix geef_ref:lookup/2

Make use of the repo server intead of accepting a handle
This commit is contained in:
Carlos Martín Nieto
2013-04-21 17:14:36 +02:00
parent 353995a2da
commit 3adfa507c0
2 changed files with 11 additions and 4 deletions

View File

@@ -9,9 +9,9 @@ new(Handle) ->
Type = geef:reference_type(Handle),
#ref{handle=Handle, type=Type}.
-spec lookup(repo(), iolist()) -> {ok, ref()} | {error, term()}.
lookup(#repo{handle=Handle}, Refname) ->
case geef:reference_lookup(Handle, Refname) of
-spec lookup(pid(), iolist()) -> {ok, ref()} | {error, term()}.
lookup(Repo, Refname) ->
case geef_repo:lookup_reference(Repo, Refname) of
{ok, Ref} ->
{ok, new(Ref)};
Other ->