Bind repository discovery

This commit is contained in:
Carlos Martín Nieto
2013-03-31 22:20:35 +02:00
parent 29217c65fe
commit 2d1d1456ec
5 changed files with 68 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
-module(geef_repo).
-export([open/1, init/2, path/1, workdir/1, odb/1, is_bare/1, references/1]).
-export([open/1, init/2, path/1, workdir/1, odb/1, is_bare/1, references/1, discover/1]).
-include("geef_records.hrl").
@@ -29,6 +29,10 @@ is_bare(#repo{handle=Handle}) ->
references(#repo{handle=Handle}) ->
geef:reference_list(Handle).
-spec discover(iolist()) -> {ok, binary()} | error | {error, term()}.
discover(Path) ->
geef:repository_discover(Path).
-spec open(iolist()) -> {ok, repo()} | {error, term()}.
open(Path) ->
case geef:repository_open(Path) of