{"thread":{"id":"24928","subject":"[Patch v2] builtin.h: Move two functions definitions to help.h.","startedAt":"2010-09-01T02:29:08Z","lastAt":"2010-09-01T02:29:08Z","messageCount":1,"participants":["Thiago Farina"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"149518","messageId":"1283308148-29880-1-git-send-email-tfransosi@gmail.com","threadId":"24928","inReplyTo":null,"subject":"[Patch v2] builtin.h: Move two functions definitions to help.h.","fromName":"Thiago Farina","fromEmail":"tfransosi@gmail.com","sentAt":"2010-09-01T02:29:08Z","receivedAt":"2010-09-01T02:29:08Z","isPatch":true,"sender":{"key":"tfransosi@gmail.com","avatar":"https://avatars.githubusercontent.com/u/970071?v=4"},"body":"The two functions defined here are implemented in help.c, so makes more sense\nto put the definition of those in help.h instead of in builtin.h.\n\nSigned-off-by: Thiago Farina <tfransosi@gmail.com>\n---\n builtin.h |    2 --\n git.c     |    3 ++-\n help.h    |   19 +++++++++++--------\n 3 files changed, 13 insertions(+), 11 deletions(-)\n\ndiff --git a/builtin.h b/builtin.h\nindex ed6ee26..0398d24 100644\n--- a/builtin.h\n+++ b/builtin.h\n@@ -11,8 +11,6 @@ extern const char git_version_string[];\n extern const char git_usage_string[];\n extern const char git_more_info_string[];\n \n-extern void list_common_cmds_help(void);\n-extern const char *help_unknown_cmd(const char *cmd);\n extern void prune_packed_objects(int);\n extern int fmt_merge_msg(int merge_summary, struct strbuf *in,\n \tstruct strbuf *out);\ndiff --git a/git.c b/git.c\nindex 12d2952..05d4156 100644\n--- a/git.c\n+++ b/git.c\n@@ -1,6 +1,7 @@\n #include \"builtin.h\"\n-#include \"exec_cmd.h\"\n #include \"cache.h\"\n+#include \"exec_cmd.h\"\n+#include \"help.h\"\n #include \"quote.h\"\n #include \"run-command.h\"\n \ndiff --git a/help.h b/help.h\nindex 56bc154..208af70 100644\n--- a/help.h\n+++ b/help.h\n@@ -16,14 +16,17 @@ static inline void mput_char(char c, unsigned int num)\n \t\tputchar(c);\n }\n \n-void load_command_list(const char *prefix,\n-\t\tstruct cmdnames *main_cmds,\n-\t\tstruct cmdnames *other_cmds);\n-void add_cmdname(struct cmdnames *cmds, const char *name, int len);\n+extern void list_common_cmds_help(void);\n+extern const char *help_unknown_cmd(const char *cmd);\n+extern void load_command_list(const char *prefix,\n+                              struct cmdnames *main_cmds,\n+\t\t              struct cmdnames *other_cmds);\n+extern void add_cmdname(struct cmdnames *cmds, const char *name, int len);\n /* Here we require that excludes is a sorted list. */\n-void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes);\n-int is_in_cmdlist(struct cmdnames *c, const char *s);\n-void list_commands(const char *title, struct cmdnames *main_cmds,\n-\t\t   struct cmdnames *other_cmds);\n+extern void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes);\n+extern int is_in_cmdlist(struct cmdnames *cmds, const char *name);\n+extern void list_commands(const char *title,\n+                          struct cmdnames *main_cmds,\n+\t\t          struct cmdnames *other_cmds);\n \n #endif /* HELP_H */\n-- \n1.7.2.1.95.g3d045\n"}]}