git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [Patch] Nice help Output - SmallProjectIdea[1]

From
Thomas Gummerer <t.gummerer@gmail.com>
Date
May 1, 2015, 19:11 UTC
Message-ID
<87wq0sw1tb.fsf@hank.tgummerer.com>
In-Reply-To
<CAKB+oNvZxueR9PqysPn3khQZL+8tt3NNrgFzNjHnVuBVtyeZ4w@mail.gmail.com>
Hi,
Alangi Derick <alangiderick@gmail.com> writes:
> This is a patch to fix the problem as given in the site:
> https://git.wiki.kernel.org/index.php/SmallProjectsIdeas

Please have a look at Documentation/SubmittingPatches, on how to submit well formed patches. In particular, the following things should be improved:

- The commit should have a meaningful commit message (See section 2 in
  SubmittingPatches)
- The patch should be created with git format-patch, so it can be
  applied using git am. (See section 3 and 4)
- Your work should be signed off, otherwise it can not be applied to the
  project. (See section 5)
Show 23 quoted lines
> diff --git a/help.c b/help.c
> index 2072a87..e347bbc 100644
> --- a/help.c
> +++ b/help.c
> @@ -229,9 +229,18 @@ void list_common_cmds_help(void)
>
>   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));
> + if(i%3 == 1){
> + printf("   %s   ", common_cmds[i].name);
> + mput_char(' ', longest - strlen(common_cmds[i].name));
> + puts(_(common_cmds[i].help));
> + printf("\n");
> + }
> + else {
> + printf("   %s   ", common_cmds[i].name);
> + mput_char(' ', longest - strlen(common_cmds[i].name));
> + puts(_(common_cmds[i].help));
> + }
> +

Patch formatting issues aside, I don't think this does what is suggested in the project. You are just adding a blank line after three lines in the help output, which I don't think improves the current state by much.

The bzr help output on the other hand groups similar commands together, and shows them to the user in groups. So the first step would be to find out which commands should be grouped together and then to output the groups here.

Show 10 quoted lines
>   }
>  }
>
>
> Regards
> Alangi Derick Ndimnain
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Alangi DerickNext: Alangi Derick
Message 2 of 4 in “Nice help Output - SmallProjectIdea[1]”
  1. Nice help Output - SmallProjectIdea[1]Alangi Derick, May 1, 2015
  2. Thomas GummererMay 1, 2015
  3. Alangi DerickMay 2, 2015
  4. Thomas GummererMay 2, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.