Removing the multiple calls to determine VCS type

This removed the subshell from _determine_vcs_base_and_type so it can
set environment variables.

Because this always runs at the beginning of the scripts, there's no
need to do checking if REPOBASE is unset or if VCS_TYPE is not yet
determined, thus I simplified one function and eliminated which_vcs.

Conflicts:
	bin/blackbox_deregister_file

I found this easier to just cherry pick since there was a merge and the
merge was reverted.
This commit is contained in:
Tyler Akins
2015-06-16 14:02:54 -05:00
parent 11b2cae683
commit cc1d7a1851
4 changed files with 37 additions and 62 deletions

View File

@@ -8,7 +8,6 @@
set -e
source "${0%/*}/_blackbox_common.sh"
_determine_vcs_base_and_type
unencrypted_file=$(get_unencrypted_filename "$1")
encrypted_file=$(get_encrypted_filename "$1")
@@ -31,4 +30,4 @@ vcs_remove "$BB_FILES"
vcs_commit "Removing from blackbox: ${unencrypted_file}"
echo "========== UPDATING VCS: DONE"
echo "Local repo updated. Please push when ready."
echo " $(which_vcs) push"
echo " $VCS_TYPE push"