do not set global values for git variables
This commit is contained in:
parent
2781ddf6a3
commit
e074531163
6
rtenets
6
rtenets
|
@ -152,15 +152,15 @@ set_git_config() {
|
||||||
while ! [[ -n "${value}" ]]; do
|
while ! [[ -n "${value}" ]]; do
|
||||||
value="$(enter "new value for ${param}: ")"
|
value="$(enter "new value for ${param}: ")"
|
||||||
done
|
done
|
||||||
\git config --global "${param}" "${value}"
|
\git config "${param}" "${value}"
|
||||||
info "setting new value for ${param}: '$(git config "${param}")'"
|
info "setting new value for ${param}: '$(\git config "${param}")'"
|
||||||
printf "${value}"
|
printf "${value}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Get value of git config parameter, set if unset
|
# Get value of git config parameter, set if unset
|
||||||
get_git_config() {
|
get_git_config() {
|
||||||
local param="$1"
|
local param="$1"
|
||||||
local value="$(git config "${param}")"
|
local value="$(\git config "${param}")"
|
||||||
if ! [[ -n "${value}" ]]; then
|
if ! [[ -n "${value}" ]]; then
|
||||||
warning "git ${param} is unset"
|
warning "git ${param} is unset"
|
||||||
value="$(set_git_config "${param}")"
|
value="$(set_git_config "${param}")"
|
||||||
|
|
Loading…
Reference in New Issue