Skip to content

Commit fd5c363

Browse files
tfarinagitster
authored andcommitted
builtin.h: Move two functions definitions to help.h.
The two functions defined here are implemented in help.c, so makes more sense to put the definition of those in help.h instead of in builtin.h. Signed-off-by: Thiago Farina <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e3efa9c commit fd5c363

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

builtin.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ extern const char git_version_string[];
1111
extern const char git_usage_string[];
1212
extern const char git_more_info_string[];
1313

14-
extern void list_common_cmds_help(void);
15-
extern const char *help_unknown_cmd(const char *cmd);
1614
extern void prune_packed_objects(int);
1715
extern int fmt_merge_msg(int merge_summary, struct strbuf *in,
1816
struct strbuf *out);

git.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "builtin.h"
2-
#include "exec_cmd.h"
32
#include "cache.h"
3+
#include "exec_cmd.h"
4+
#include "help.h"
45
#include "quote.h"
56
#include "run-command.h"
67

help.h

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ static inline void mput_char(char c, unsigned int num)
1616
putchar(c);
1717
}
1818

19-
void load_command_list(const char *prefix,
20-
struct cmdnames *main_cmds,
21-
struct cmdnames *other_cmds);
22-
void add_cmdname(struct cmdnames *cmds, const char *name, int len);
19+
extern void list_common_cmds_help(void);
20+
extern const char *help_unknown_cmd(const char *cmd);
21+
extern void load_command_list(const char *prefix,
22+
struct cmdnames *main_cmds,
23+
struct cmdnames *other_cmds);
24+
extern void add_cmdname(struct cmdnames *cmds, const char *name, int len);
2325
/* Here we require that excludes is a sorted list. */
24-
void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes);
25-
int is_in_cmdlist(struct cmdnames *c, const char *s);
26-
void list_commands(const char *title, struct cmdnames *main_cmds,
27-
struct cmdnames *other_cmds);
26+
extern void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes);
27+
extern int is_in_cmdlist(struct cmdnames *cmds, const char *name);
28+
extern void list_commands(const char *title,
29+
struct cmdnames *main_cmds,
30+
struct cmdnames *other_cmds);
2831

2932
#endif /* HELP_H */

0 commit comments

Comments
 (0)