aboutsummaryrefslogtreecommitdiff
path: root/help.c
diff options
context:
space:
mode:
Diffstat (limited to 'help.c')
-rw-r--r--help.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/help.c b/help.c
index 3c36d9c218..84b9e5efe4 100644
--- a/help.c
+++ b/help.c
@@ -20,6 +20,7 @@
#include "prompt.h"
#include "fsmonitor-ipc.h"
#include "repository.h"
+#include "alias.h"
#ifndef NO_CURL
#include "git-curl-compat.h" /* For LIBCURL_VERSION only */
@@ -469,20 +470,6 @@ void list_developer_interfaces_help(void)
putchar('\n');
}
-static int get_alias(const char *var, const char *value,
- const struct config_context *ctx UNUSED, void *data)
-{
- struct string_list *list = data;
-
- if (skip_prefix(var, "alias.", &var)) {
- if (!value)
- return config_error_nonbool(var);
- string_list_append(list, var)->util = xstrdup(value);
- }
-
- return 0;
-}
-
static void list_all_cmds_help_external_commands(void)
{
struct string_list others = STRING_LIST_INIT_DUP;
@@ -502,7 +489,7 @@ static void list_all_cmds_help_aliases(int longest)
struct cmdname_help *aliases;
int i;
- repo_config(the_repository, get_alias, &alias_list);
+ list_aliases(&alias_list);
string_list_sort(&alias_list);
for (i = 0; i < alias_list.nr; i++) {