This module performs common GIT tasks by calling git as a remote process
through process_create/3. It requires that the git
executable is in the
current PATH.
This module started life in ClioPatria and has been used by the Prolog web-server to provide information on git repositories. It is now moved into the core Prolog library to support the Prolog package manager.
informational
.output(Out)
, but messages are printed at level error
.call(OnOutput, Stream)
.V*
)HEAD
object(Mode, Type, Hash, Size, Name)
git ls-remote
against the remote repository to fetch
references from the remote. Options processed:
heads(Boolean)
tags(Boolean)
refs(List)
For example, to find the hash of the remote HEAD
, one can use
?- git_ls_remote('git://www.swi-prolog.org/home/pl/git/pl-devel.git', Refs, [refs(['HEAD'])]). Refs = ['5d596c52aa969d88e7959f86327f5c7ff23695f3'-'HEAD'].
path
, but Path is relative to the repository.stat
The following predicates are exported, but not or incorrectly documented.