git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] git help: group common commands by theme
@ 2015-05-01 14:51 Sébastien Guimmara
  2015-05-01 15:04 ` [PATCH 1/2] " Sébastien Guimmara
  2015-05-01 15:12 ` [PATCH 2/2] " Sébastien Guimmara
  0 siblings, 2 replies; 20+ messages in thread
From: Sébastien Guimmara @ 2015-05-01 14:51 UTC (permalink / raw)
  To: git

Hello everyone,

This is my first contribution to an open source project.

I tackled the issue found here:
https://git.wiki.kernel.org/index.php/SmallProjectsIdeas#improve_.22git_help.22

Namely, format the output of 'git help' so that
the commands are grouped by theme.

Author: Sébastien Guimmara <sebastien.guimmara@gmail.com>
Date:   Fri May 1 15:48:57 2015 +0200

     command-list.txt - added command groups to common commands

     groups are in the form: 'x_group',
     where x is a number used to order (ascending)
     commands in the displayed help.

     example:  git-add        mainporcelain common-2_worktree

diff --git a/command-list.txt b/command-list.txt
index f1eae08..b0730a2 100644
--- a/command-list.txt
+++ b/command-list.txt
@@ -1,29 +1,29 @@
  # List of known git commands.
  # command name                category [deprecated] [common]
-git-add                                 mainporcelain common
+git-add                                 mainporcelain common-3_worktree
  git-am                                  mainporcelain
  git-annotate                            ancillaryinterrogators
  git-apply                               plumbingmanipulators
  git-archimport                          foreignscminterface
  git-archive                             mainporcelain
-git-bisect                              mainporcelain common
+git-bisect                              mainporcelain common-7_search
  git-blame                               ancillaryinterrogators
-git-branch                              mainporcelain common
+git-branch                              mainporcelain common-6_branching
  git-bundle                              mainporcelain
  git-cat-file                            plumbinginterrogators
  git-check-attr                          purehelpers
  git-check-ignore                        purehelpers
  git-check-mailmap                       purehelpers
-git-checkout                            mainporcelain common
+git-checkout                            mainporcelain common-6_branching
  git-checkout-index                      plumbingmanipulators
  git-check-ref-format                    purehelpers
  git-cherry                              ancillaryinterrogators
  git-cherry-pick                         mainporcelain
  git-citool                              mainporcelain
  git-clean                               mainporcelain
-git-clone                               mainporcelain common
+git-clone                               mainporcelain common-1_init
  git-column                              purehelpers
-git-commit                              mainporcelain common
+git-commit                              mainporcelain common-5_history
  git-commit-tree                         plumbingmanipulators
  git-config                              ancillarymanipulators
  git-count-objects                       ancillaryinterrogators
@@ -35,14 +35,14 @@ git-cvsimport foreignscminterface
  git-cvsserver                           foreignscminterface
  git-daemon                              synchingrepositories
  git-describe                            mainporcelain
-git-diff                                mainporcelain common
+git-diff                                mainporcelain common-5_history
  git-diff-files                          plumbinginterrogators
  git-diff-index                          plumbinginterrogators
  git-diff-tree                           plumbinginterrogators
  git-difftool                            ancillaryinterrogators
  git-fast-export                ancillarymanipulators
  git-fast-import                ancillarymanipulators
-git-fetch                               mainporcelain common
+git-fetch                               mainporcelain common-4_remote
  git-fetch-pack                          synchingrepositories
  git-filter-branch                       ancillarymanipulators
  git-fmt-merge-msg                       purehelpers
@@ -51,7 +51,7 @@ git-format-patch mainporcelain
  git-fsck                            ancillaryinterrogators
  git-gc                                  mainporcelain
  git-get-tar-commit-id                   ancillaryinterrogators
-git-grep                                mainporcelain common
+git-grep                                mainporcelain common-7_search
  git-gui                                 mainporcelain
  git-hash-object                         plumbingmanipulators
  git-help                ancillaryinterrogators
@@ -60,17 +60,17 @@ git-http-fetch synchelpers
  git-http-push                           synchelpers
  git-imap-send                           foreignscminterface
  git-index-pack                          plumbingmanipulators
-git-init                                mainporcelain common
+git-init                                mainporcelain common-1_init
  git-instaweb                            ancillaryinterrogators
  git-interpret-trailers                  purehelpers
  gitk                                    mainporcelain
-git-log                                 mainporcelain common
+git-log                                 mainporcelain common-2_info
  git-ls-files                            plumbinginterrogators
  git-ls-remote                           plumbinginterrogators
  git-ls-tree                             plumbinginterrogators
  git-mailinfo                            purehelpers
  git-mailsplit                           purehelpers
-git-merge                               mainporcelain common
+git-merge                               mainporcelain common-6_branching
  git-merge-base                          plumbinginterrogators
  git-merge-file                          plumbingmanipulators
  git-merge-index                         plumbingmanipulators
@@ -79,7 +79,7 @@ git-mergetool ancillarymanipulators
  git-merge-tree                          ancillaryinterrogators
  git-mktag                               plumbingmanipulators
  git-mktree                              plumbingmanipulators
-git-mv                                  mainporcelain common
+git-mv                                  mainporcelain common-3_worktree
  git-name-rev                            plumbinginterrogators
  git-notes                               mainporcelain
  git-p4                                  foreignscminterface
@@ -90,11 +90,11 @@ git-parse-remote synchelpers
  git-patch-id                            purehelpers
  git-prune                               ancillarymanipulators
  git-prune-packed                        plumbingmanipulators
-git-pull                                mainporcelain common
-git-push                                mainporcelain common
+git-pull                                mainporcelain common-4_remote
+git-push                                mainporcelain common-4_remote
  git-quiltimport                         foreignscminterface
  git-read-tree                           plumbingmanipulators
-git-rebase                              mainporcelain common
+git-rebase                              mainporcelain common-5_history
  git-receive-pack                        synchelpers
  git-reflog                              ancillarymanipulators
  git-relink                              ancillarymanipulators
@@ -103,28 +103,28 @@ git-repack ancillarymanipulators
  git-replace                             ancillarymanipulators
  git-request-pull                        foreignscminterface
  git-rerere                              ancillaryinterrogators
-git-reset                               mainporcelain common
+git-reset                               mainporcelain common-3_worktree
  git-revert                              mainporcelain
  git-rev-list                            plumbinginterrogators
  git-rev-parse                           ancillaryinterrogators
-git-rm                                  mainporcelain common
+git-rm                                  mainporcelain common-3_worktree
  git-send-email                          foreignscminterface
  git-send-pack                           synchingrepositories
  git-shell                               synchelpers
  git-shortlog                            mainporcelain
-git-show                                mainporcelain common
+git-show                                mainporcelain common-2_info
  git-show-branch                         ancillaryinterrogators
  git-show-index                          plumbinginterrogators
  git-show-ref                            plumbinginterrogators
  git-sh-i18n                             purehelpers
  git-sh-setup                            purehelpers
  git-stash                               mainporcelain
-git-status                              mainporcelain common
+git-status                              mainporcelain common-2_info
  git-stripspace                          purehelpers
  git-submodule                           mainporcelain
  git-svn                                 foreignscminterface
  git-symbolic-ref                        plumbingmanipulators
-git-tag                                 mainporcelain common
+git-tag                                 mainporcelain common-5_history
  git-unpack-file                         plumbinginterrogators
  git-unpack-objects                      plumbingmanipulators
  git-update-index                        plumbingmanipulators

^ permalink raw reply related	[flat|nested] 20+ messages in thread
* [PATCH 0/3] git help: group common commands by theme
@ 2015-05-04 20:28 Sébastien Guimmara
  2015-05-06  3:08 ` Eric Sunshine
                   ` (3 more replies)
  0 siblings, 4 replies; 20+ messages in thread
From: Sébastien Guimmara @ 2015-05-04 20:28 UTC (permalink / raw)
  To: git; +Cc: Sébastien Guimmara, gitster, sunshine

This v4 includes the following suggestions:

In command-list.txt:
- Add a [groups] block containing names and description for groups:

   [groups]
   init                   starting a working area
   worktree               working on the current change
   remote                 working with others
   info                   examining the history and state
   history                growing, marking and tweaking your history

- Add a [commands] header on top of the known command list, and
  group names as a third column.

   [commands]
   git-add            mainporcelain                common-worktree
   git-am             mainporcelain
   git-annotate       ancillaryinterrogators
   git-apply          plumbingmanipulators
   git-archimport     foreignscminterface
   git-archive        mainporcelain
   git-bisect         mainporcelain
   git-blame          ancillaryinterrogators
   git-branch         mainporcelain                common-history

This produces the following output of $ git help:

[...]
The most commonly used git commands are:

   * starting a working area:
      clone      Clone a repository into a new directory
      init       Create an empty Git repository or reinitialize [...]

   * working on the current change:
      add        Add file contents to the index
      reset      Reset current HEAD to the specified state

   * working with others:
      fetch      Download objects and refs from another repository
      pull       Fetch from and integrate with another repository [...]
      push       Update remote refs along with associated objects

   * examining the history and state:
      log        Show commit logs
      status     Show the working tree status

   * growing, marking and tweaking your history:
      branch     List, create, or delete branches
      checkout   Checkout a branch or paths to the working tree
      commit     Record changes to the repository
      diff       Show changes between commits, commit and working [...]
      merge      Join two or more development histories together
[...]

I removed from the list of common commands: rebase, rm, mv, bisect 
because [1] they are not really common to an unfamiliar user, [2] to
save vertical space occupied by group headers.

Thanks to Junio and Eric for their suggestions.

Sébastien Guimmara (3):
  command-list.txt: group common commands by theme
  generate-cmdlist.sh: parse common group commands
  git help: group common commands by theme

 command-list.txt    | 64 +++++++++++++++++++++++++++++++----------------------
 generate-cmdlist.sh | 43 +++++++++++++++++++++++++----------
 help.c              | 28 ++++++++++++++++++++++-
 3 files changed, 95 insertions(+), 40 deletions(-)

-- 
2.4.0

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2015-05-08 20:08 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-01 14:51 [PATCH 0/3] git help: group common commands by theme Sébastien Guimmara
2015-05-01 15:04 ` [PATCH 1/2] " Sébastien Guimmara
2015-05-01 15:12 ` [PATCH 2/2] " Sébastien Guimmara
  -- strict thread matches above, loose matches on Subject: below --
2015-05-04 20:28 [PATCH 0/3] " Sébastien Guimmara
2015-05-06  3:08 ` Eric Sunshine
2015-05-06 20:26   ` Sébastien Guimmara
2015-05-06 20:49     ` Eric Sunshine
2015-05-06  3:41 ` Junio C Hamano
2015-05-08 18:00   ` Sébastien Guimmara
2015-05-08 18:53     ` Junio C Hamano
2015-05-06  7:59 ` Matthieu Moy
2015-05-06 17:42   ` Junio C Hamano
2015-05-07  8:42     ` Matthieu Moy
2015-05-07 18:44       ` Junio C Hamano
2015-05-08  8:18         ` Matthieu Moy
2015-05-08 16:19           ` Junio C Hamano
2015-05-07  9:31 ` Emma Jane Hogbin Westby
2015-05-08 18:21   ` Sébastien Guimmara
2015-05-08 18:58     ` Junio C Hamano
2015-05-08 20:08       ` Sébastien Guimmara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).