View Source egit (egit v0.1.1)

Link to this section Summary

Functions

Same as add(Repo, FileSpecs, Opts).
Add files matching PathSpecs to index.
Add all pending changes
Provide content or type and size information for repository objects
Provide content or type and size information for repository objects
Same as checkout(Repo, Revision, []).
Provide content or type and size information for repository objects. If Opts contains verbose (and optionally perf), then the return is a map with checkout stats.
Clone a remote repository to the local path
Commit changes to a repository
Lookup commit details identified by OID
Fetch from origin
Fetch from given remote (e.g. <<"origin">>)
Open a local git repository
Pull from origin
Pull from given remote (e.g. <<"origin">>)
Reverse parse a reference

Link to this section Types

-type add_opt() :: verbose | dry_run | update | force.
-type add_opts() :: [add_opt()].
-type cat_file_opt() :: type | size | all.
-type checkout_opt() :: force | verbose | perf.
-type checkout_opts() :: [checkout_opt()].
-type checkout_stats() ::
    #{chmod_calls => integer(),
      mkdir_calls => integer(),
      stat_calls => integer(),
      total_steps => integer()}.
-type commit_opt() ::
    encoding | message | summary | time | time_offset | committer | author | header | tree_id.
-type commit_opts() :: [commit_opt()].
-type repository() :: reference().

Link to this section Functions

-spec add(repository(), binary() | [binary()]) -> [binary()] | {error, term()}.
Same as add(Repo, FileSpecs, Opts).
Link to this function

add(Repo, PathSpec, Opts)

View Source
-spec add(repository(), [binary()], add_opts()) -> [binary()] | {error, term()}.
Add files matching PathSpecs to index.
Add all pending changes
Link to this function

cat_file(Repo, Revision)

View Source
-spec cat_file(repository(), binary()) -> {ok, term()} | {error, term()}.
Provide content or type and size information for repository objects
Link to this function

cat_file(Repo, Revision, Opt)

View Source
-spec cat_file(repository(), binary(), cat_file_opt()) -> {ok, term()} | {error, term()}.
Provide content or type and size information for repository objects
Link to this function

checkout(Repo, Revision)

View Source
-spec checkout(repository(), binary()) -> ok | {error, term()}.
Same as checkout(Repo, Revision, []).
Link to this function

checkout(Repo, Revision, Opts)

View Source
-spec checkout(repository(), binary(), checkout_opts()) -> ok | checkout_stats() | {error, term()}.
Provide content or type and size information for repository objects. If Opts contains verbose (and optionally perf), then the return is a map with checkout stats.
-spec clone(binary(), binary()) -> repository().
Clone a remote repository to the local path
-spec commit(repository(), binary()) -> {ok, OID :: binary()} | {error, binary() | atom()}.
Commit changes to a repository
Link to this function

commit_lookup(Repo, OID, Opts)

View Source
-spec commit_lookup(repository(), binary(), [commit_opt()]) -> #{commit_opt() => term()}.
Lookup commit details identified by OID
-spec fetch(repository()) -> ok | {error, binary()}.
Fetch from origin
-spec fetch(repository(), binary()) -> ok | {error, binary()}.
Fetch from given remote (e.g. <<"origin">>)
-spec open(binary()) -> repository().
Open a local git repository
-spec pull(repository()) -> ok | {error, binary()}.
Pull from origin
-spec pull(repository(), binary()) -> ok | {error, binary()}.
Pull from given remote (e.g. <<"origin">>)
-spec rev_parse(repository(), binary()) -> map() | {error, binary() | atom()}.
Reverse parse a reference