3.5.1 Module anvl_git

A builtin plugin for cloning Git repositories.

3.5.1.1 Types

provides()
-type provides() :: undefined |
                    [{anvl_locate:kind(), anvl_locate:dependency()}].
ref()
-type ref() :: {branch, string()} |
               {tag, string()} |
               {commit, string()} |
               string().
repo()
-type repo() :: string().
id()
-type id() :: atom().

3.5.1.2 Functions

find_commit(Repo, Ref)
-spec find_commit(repo(), ref()) -> binary().

Resolve git reference into a commit hash.

ls_files(Dir, Options)
-spec ls_files(file:filename(),
               [no_cache | other | relative | {x, string()}]) -> {ok,
                                                                  [file:filename()]} |
                                                                 {error, _}.

Convenience wrapper for git ls-files command. It supports the following options:

other

Include untracked files (excluding files covered by .gitignore). This option is passes -o to the command.

no_cache

Exclude cached files. This option disable passing -c to the command.

relative

Return relative paths, overriding default behavior where absolute paths within Dir are returned.

{x, WildcardPattern}

Exclude untracked files matching the pattern. Can be repeated.

sources_prepared(A, B, C)
-spec sources_prepared(repo(), Dir :: file:filename(),
                       binary()) -> anvl_condition:t().

Condition: repository Repo is cloned to directory Dir, and commit Hash is checked out.


JavaScript license information