Skip to content

Commit

Permalink
config: require lowercase for branch.*.autosetupmerge
Browse files Browse the repository at this point in the history
Although we only documented that branch.*.autosetupmerge would accept
"always" as a value, the actual implementation would accept any
combination of upper- or lower-case. Fix this to be consistent with
documentation and with other values of this config variable.

Signed-off-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
steadmon authored and gitster committed Dec 21, 2021
1 parent d311566 commit 44f14a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config.c
Expand Up @@ -1556,7 +1556,7 @@ static int git_default_i18n_config(const char *var, const char *value)
static int git_default_branch_config(const char *var, const char *value)
{
if (!strcmp(var, "branch.autosetupmerge")) {
if (value && !strcasecmp(value, "always")) {
if (value && !strcmp(value, "always")) {
git_branch_track = BRANCH_TRACK_ALWAYS;
return 0;
} else if (value && !strcmp(value, "inherit")) {
Expand Down

0 comments on commit 44f14a9

Please sign in to comment.