1
0
Fork 0
mirror of synced 2024-12-23 06:20:43 -05:00

Remove undocumented git-info configuration

`prompt.showinfo` for enabling or disabling it globally or per
repository. It can be globally disabled by not loading the `git-info`
module at all, and prompts currently will not break (and in the future
should still not break) if the module is not loaded.

This removes one git call that is used to check for the
`prompt.showinfo` configuration value.
This commit is contained in:
Eric Nielsen 2017-03-15 09:36:02 -05:00 committed by Matt Hamilton
parent 53aef5a05c
commit a844454a65

View file

@ -100,22 +100,6 @@ git-info() {
return 1
fi
if (( $# )); then
if [[ $1 == [Oo][Nn] ]]; then
git config --bool prompt.showinfo true
elif [[ $1 == [Oo][Ff][Ff] ]]; then
git config --bool prompt.showinfo false
else
print "usage: $0 [ on | off ]" >&2
fi
return 0
fi
# Return if git-info is disabled.
if ! is-true ${$(git config --bool prompt.showinfo):-true}; then
return 1
fi
# Ignore submodule status.
local ignore_submodules
zstyle -s ':zim:git-info' ignore-submodules 'ignore_submodules' || ignore_submodules='all'