Skip to content

Commit 2446f30

Browse files
authored
fix: config get/unset now handle multi-value keys correctly (#37)
1 parent 7f37c33 commit 2446f30

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bin/gtr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ cmd_config() {
898898
log_error "Usage: git gtr config get <key> [--global]"
899899
exit 1
900900
fi
901-
cfg_get "$key" "$scope"
901+
cfg_get_all "$key" "$scope"
902902
;;
903903
set)
904904
if [ -z "$key" ] || [ -z "$value" ]; then

lib/config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ cfg_unset() {
121121
--local|local|*) flag="--local" ;;
122122
esac
123123

124-
git config $flag --unset "$key" 2>/dev/null || true
124+
git config $flag --unset-all "$key" 2>/dev/null || true
125125
}
126126

127127
# Get config value with environment variable fallback

0 commit comments

Comments
 (0)