saltstack/salt — pull request #1255 by Secretions (2012-05-10 21:49:34+00:00)
Title: Added "force" option to git.latest state

This commit adds a "force" option to git.latest. It now checks for both target and target/.git to determine whether the target is a git repository that should be pulled, or if cloning is necessary. If cloning is necessary and the target exists, the force option can be used with will delete the existing target directory to allow git to clone the repository in it's place. Otherwise, it returns an error indicating that the target already exists, but isn't a git repository.