elvis_git (elvis v4.1.1)

View Source

Summary

Functions

Install a pre commit hook for the git repository in the current dir.

Takes a git patch and an absolute file line number and returns a relative position for that line in the patch.

Functions

branch_files(Commit)

-spec branch_files(string()) -> [elvis_file:file()].

install_hook()

-spec install_hook() -> ok.

Install a pre commit hook for the git repository in the current dir.

relative_position(Patch, LineNum)

-spec relative_position(binary(), integer()) -> {ok, integer()} | not_found.

Takes a git patch and an absolute file line number and returns a relative position for that line in the patch.

run_branch(Commit, Config)

-spec run_branch(string(), elvis_config:configs()) -> ok.

run_hook(Config)

-spec run_hook(elvis_config:configs()) -> ok.

staged_files()

-spec staged_files() -> [elvis_file:file()].