BUGFIX: actually clear variables

The current `git_clear_vars()` method appears to have iterated over all
the existing set variable correctly, but never actually bothered to
clear them.
This commit is contained in:
Matthew Rothenberg
2014-10-15 02:21:35 -04:00
parent 885cc6fc12
commit ed2240e214

View File

@@ -166,7 +166,12 @@ git_clear_vars() {
local i
for (( i=1; i<=$gs_max_changes; i++ )); do
# Stop clearing after first empty var
if [[ -z "$(eval echo "\${$git_env_char$i:-}")" ]]; then break; fi
local env_var_i=${git_env_char}${i}
if [[ -z "$(eval echo "\${$env_var_i:-}")" ]]; then
break
else
unset $env_var_i
fi
done
}