X-Git-Url: http://git.tremily.us/?p=git.git;a=blobdiff_plain;f=help.c;h=1dfa0b05827e6e75dc463092b2838cd1c991623c;hp=2a42ec6d1f312b573d7b1da1a15471d21efc5b4d;hb=dc7e7bced41b3a362a94cb1670ff183459d8d3a8;hpb=51c6de2bab06562d0e69dcfd48f04a3b28a878b1 diff --git a/help.c b/help.c index 2a42ec6d1..1dfa0b058 100644 --- a/help.c +++ b/help.c @@ -223,6 +223,23 @@ void list_commands(unsigned int colopts, } } +void list_common_cmds_help(void) +{ + int i, longest = 0; + + for (i = 0; i < ARRAY_SIZE(common_cmds); i++) { + if (longest < strlen(common_cmds[i].name)) + longest = strlen(common_cmds[i].name); + } + + puts(_("The most commonly used git commands are:")); + for (i = 0; i < ARRAY_SIZE(common_cmds); i++) { + printf(" %s ", common_cmds[i].name); + mput_char(' ', longest - strlen(common_cmds[i].name)); + puts(_(common_cmds[i].help)); + } +} + int is_in_cmdlist(struct cmdnames *c, const char *s) { int i;