Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Git 2.5.4
[gitweb.git]
/
alias.c
diff --git
a/alias.c
b/alias.c
index 6aa164a362427ffa5dc8616bcb01aec3f15b462b..a11229db9e67b7b651356be3fb1d4b3d1014a8bd 100644
(file)
--- a/
alias.c
+++ b/
alias.c
@@
-5,7
+5,8
@@
char *alias_lookup(const char *alias)
char *v = NULL;
struct strbuf key = STRBUF_INIT;
strbuf_addf(&key, "alias.%s", alias);
- git_config_get_string(key.buf, &v);
+ if (git_config_key_is_valid(key.buf))
+ git_config_get_string(key.buf, &v);
strbuf_release(&key);
return v;
}