diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2017-07-14 10:39:38 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-07-17 23:00:12 +0200 |
commit | 643df7e234dda47a4748311361a82df5415b7bc1 (patch) | |
tree | 46d12d02e9e96cbcbc3a3e606a49b2132b7d883b /alias.c | |
parent | t1300: demonstrate that CamelCased aliases regressed (diff) | |
download | git-643df7e234dda47a4748311361a82df5415b7bc1.tar.xz git-643df7e234dda47a4748311361a82df5415b7bc1.zip |
alias: compare alias name *case-insensitively*
It is totally legitimate to add CamelCased aliases, but due to the way
config keys are compared, the case does not matter.
Therefore, we must compare the alias name insensitively to the config
keys.
This fixes a regression introduced by a9bcf6586d1 (alias: use
the early config machinery to expand aliases, 2017-06-14).
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'alias.c')
-rw-r--r-- | alias.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -10,7 +10,7 @@ static int config_alias_cb(const char *key, const char *value, void *d) struct config_alias_data *data = d; const char *p; - if (skip_prefix(key, "alias.", &p) && !strcmp(p, data->alias)) + if (skip_prefix(key, "alias.", &p) && !strcasecmp(p, data->alias)) return git_config_string((const char **)&data->v, key, value); return 0; |