protocol
git_protocol
Predicates for accessing a git project current branch and latest commit data.
logtalk_load(git(loader))staticPublic predicates
branch/2
Returns the name of the current git branch. Fails if the directory is not a git repo or a sub-directory of a git repo directory.
staticbranch(Directory,Branch)branch(+atom,?atom) - zero_or_oneroot/2
Returns the absolute file path for the git repo root. Fails if the directory is not a git repo or a sub-directory of a git repo directory.
staticroot(Directory,Root)root(+atom,?atom) - zero_or_oneremote/3
Returns the git repo remote URI. Fails if the directory is not a git repo or a sub-directory of a git repo directory.
staticremote(Directory,Remote,URI)remote(+atom,+atom,?atom) - zero_or_oneworking_tree_clean/1
Succeeds if tracked files have no staged or unstaged changes, including submodule changes. Untracked files are ignored. Fails if git status fails.
staticworking_tree_clean(Directory)working_tree_clean(+atom) - zero_or_oneworking_tree_status/2
Returns git status porcelain version 1 output for tracked changes, including submodule changes. Untracked files are ignored. Fails if git status fails.
staticworking_tree_status(Directory,Status)working_tree_status(+atom,-atom) - zero_or_onecommit_date/2
Returns the latest commit date (strict ISO 8601 format). Fails if the directory is not a git repo or a sub-directory of a git repo directory.
staticcommit_date(Directory,Date)commit_date(+atom,-atom) - zero_or_onecommit_hash/2
Returns the latest commit hash. Fails if the directory is not a git repo or a sub-directory of a git repo directory.
staticcommit_hash(Directory,Hash)commit_hash(+atom,-atom) - zero_or_onecommit_hash_abbreviated/2
Returns the latest commit abbreviated hash. Fails if the directory is not a git repo or a sub-directory of a git repo directory.
staticcommit_hash_abbreviated(Directory,Hash)commit_hash_abbreviated(+atom,-atom) - zero_or_onecommit_message/2
Returns the latest commit message. Fails if the directory is not a git repo or a sub-directory of a git repo directory.
staticcommit_message(Directory,Message)commit_message(+atom,-atom) - zero_or_onecommit_log/3
Returns the git latest commit log output for the given format (see e.g. https://git-scm.com/docs/pretty-formats). Fails if the directory is not a git repo or a sub-directory of a git repo directory.
staticcommit_log(Directory,Format,Output)commit_log(+atom,+atom,-atom) - zero_or_oneProtected predicates
(none)
Private predicates
(none)
Operators
(none)