mc_git / Interaction with Git repositories

The difference or to be more precise, the only addition of using git.latest is that we do a merge –ff-only when pulling in case of errors to be a bit more fairful on updates

https://github.com/saltstack/salt.git:
  mc_git.latest:
    - rev: develop
    - target: /tmp/salt
mc_states.states.mc_git.latest(*args, **kwargs)

Compat wrapper

mc_states.states.mc_git.old_latest(name, rev=None, target=None, runas=None, user=None, force=None, force_checkout=False, submodules=False, mirror=False, bare=False, remote_name='origin', always_fetch=False, identity=None, onlyif=False, unless=False, firstrun=True)

Make sure the repository is cloned to the given directory and is up to date Thin wrapper to git.latest that also makes a git merge –only-ff to merge unharmful commits without failling hard

name
Address of the remote repository as passed to “git clone”
rev
The remote branch, tag, or revision ID to checkout after clone / before update
target
Name of the target directory where repository is about to be cloned
runas

Name of the user performing repository management operations

Deprecated since version 0.17.0.

user

Name of the user performing repository management operations

New in version 0.17.0.

force
Force git to clone into pre-existing directories (deletes contents)
force_checkout
Force a checkout even if there might be overwritten changes (Default: False)
submodules
Update submodules on clone or branch change (Default: False)
mirror
True if the repository is to be a mirror of the remote repository. This implies bare, and thus is incompatible with rev.
bare
True if the repository is to be a bare clone of the remote repository. This is incompatible with rev, as nothing will be checked out.
remote_name
defines a different remote name. For the first clone the given name is set to the default remote, else it is just a additional remote. (Default: ‘origin’)
always_fetch
If a tag or branch name is used as the rev a fetch will not occur until the tag or branch name changes. Setting this to true will force a fetch to occur. Only applies when rev is set. (Default: False)
identity
A path to a private key to use over SSH
onlyif
A command to run as a check, run the named command only if the command passed to the onlyif option returns true
unless
A command to run as a check, only run the named command if the command passed to the unless option returns false