saltstack/salt — pull request #2419 by ffa (2012-11-01 08:25:43+00:00)
Title: allow git to clone into empty directories

* when the user `runas` doesn't have permission to create a directory in the
parent directory of `target` or `name`, the directory may be created in
preparation of git. So, don't remove the empty directory before cloning.

* the force option still removes the directory even if it is empty

This behavior is more consistent with git's behavior because git clones into empty directories. It's also more consistent with the idea of a `force` option. If `force` is not "True", removal should not occur.