diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-08-27 17:28:31 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-08-27 17:28:31 -0700 |
commit | a1184d85e8752658f02746982822f43f32316803 (patch) | |
tree | f4508ca7d63ca7e71c3e99cac4e54945f777b1aa /help.h | |
parent | 8d13caf795902812d44809e2f222fb2334030603 (diff) | |
parent | e596cdddf349b244dca854bf5a7aa9428b48fc50 (diff) | |
download | git-a1184d85e8752658f02746982822f43f32316803.tar.gz |
Merge branch 'mv/merge-custom'
* mv/merge-custom:
t7606: fix custom merge test
Fix "git-merge -s bogo" help text
Update .gitignore to ignore git-help
Builtin git-help.
builtin-help: always load_command_list() in cmd_help()
Add a second testcase for handling invalid strategies in git-merge
Add a new test for using a custom merge strategy
builtin-merge: allow using a custom strategy
builtin-help: make some internal functions available to other builtins
Conflicts:
help.c
Diffstat (limited to 'help.h')
-rw-r--r-- | help.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/help.h b/help.h new file mode 100644 index 0000000000..3f1ae89dd6 --- /dev/null +++ b/help.h @@ -0,0 +1,29 @@ +#ifndef HELP_H +#define HELP_H + +struct cmdnames { + int alloc; + int cnt; + struct cmdname { + size_t len; + char name[FLEX_ARRAY]; + } **names; +}; + +static inline void mput_char(char c, unsigned int num) +{ + while(num--) + putchar(c); +} + +unsigned int load_command_list(const char *prefix, + struct cmdnames *main_cmds, + struct cmdnames *other_cmds); +void add_cmdname(struct cmdnames *cmds, const char *name, int len); +/* Here we require that excludes is a sorted list. */ +void exclude_cmds(struct cmdnames *cmds, struct cmdnames *excludes); +int is_in_cmdlist(struct cmdnames *c, const char *s); +void list_commands(const char *title, unsigned int longest, + struct cmdnames *main_cmds, struct cmdnames *other_cmds); + +#endif /* HELP_H */ |