Skip to content

Commit a35493f

Browse files
author
Jorengarenar
committed
Use single dash in 'format-X' and 'map-X' config keys
1 parent 6af4ef0 commit a35493f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

git-autofmt-diff

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ _git_conf_get__cb__ft_map () (
7676
debug "args =" "$@"
7777

7878
# shellcheck disable=SC2086,SC2154
79-
git config $conf --get-regexp "$gc_prog_name"'\.map--' | while read -r line; do
79+
git config $conf --get-regexp "$gc_prog_name"'\.map-' | while read -r line; do
8080
line="$(echo "$line" | awk -F'--' '{print $2}')"
8181
ft="$(echo "$line" | cut -d' ' -f1)"
8282
ext="$(echo "$line" | cut -d' ' -f2- | pat_list_to_case)"
@@ -129,14 +129,14 @@ git_conf_get__ft_formatter () (
129129

130130
debug "args =" "$@"
131131

132-
fmt="$(git_conf_get__call_ _git_conf_get__cb__section_glob "$file" "formatter=$ft")"
132+
fmt="$(git_conf_get__call_ _git_conf_get__cb__section_glob "$file" "formatter-$ft")"
133133

134134
if [ -z "$fmt" ]; then
135135
fmt="$(git_conf_get__call_ _git_conf_get__cb__simple "$gc_prog_name.=$ft.formatter")"
136136
fi
137137

138138
if [ -z "$fmt" ]; then
139-
fmt="$(git_conf_get__call_ _git_conf_get__cb__simple "$gc_prog_name.formatter=$ft")"
139+
fmt="$(git_conf_get__call_ _git_conf_get__cb__simple "$gc_prog_name.formatter-$ft")"
140140
fi
141141

142142
echo "$fmt"

0 commit comments

Comments
 (0)