1#include "cache.h"
23
static const char *alias_key;
4static char *alias_val;
5static int alias_lookup_cb(const char *k, const char *v)
6{
7if (!prefixcmp(k, "alias.") && !strcmp(k+6, alias_key)) {
8if (!v)
9return config_error_nonbool(k);
10alias_val = xstrdup(v);
11return 0;
12}
13return 0;
14}
1516
char *alias_lookup(const char *alias)
17{
18alias_key = alias;
19alias_val = NULL;
20git_config(alias_lookup_cb);
21return alias_val;
22}