saltstack/salt-bootstrap — pull request #476 by HowardMei (2014-10-16 07:01:19+00:00)
Title: improve __git_clone_and_checkout to support saltrepo srcurl wit...

There is a bug in current -g option and __git_clone_and_checkout function. For example:
./bootstrap-salt.sh -g "http://example.com/git/saltstack" -M -F -L git develop
will encounter a fatal error and break the installation complaining the '/tmp/git/salt' repository cannot be found.
That's because the git clone command lines in __git_clone_and_checkout use the default name 'saltstack' as the reponame instead of __SALT_GIT_CHECKOUT_DIR base name.
Manually setting environment variable BS_SALT_GIT_CHECKOUT_DIR="/tmp/git/saltstack" is a way to bypass the error.
However, the improved __git_clone_and_checkout is a more robust solution.