{"thread":{"id":"39361","subject":"[PATCH v8 1/5] command-list: prepare machinery for upcoming \"common groups\" section","startedAt":"2015-05-18T19:18:12Z","lastAt":"2015-05-19T18:20:03Z","messageCount":12,"participants":["Sébastien Guimmara","Junio C Hamano","Eric Sunshine"],"isPatch":true,"patchVersion":8,"patchTotal":5},"messages":[{"id":"261499","messageId":"1431976697-26288-1-git-send-email-sebastien.guimmara@gmail.com","threadId":"39361","inReplyTo":null,"subject":"[PATCH v8 0/5] group common commands by theme","fromName":"Sébastien Guimmara","fromEmail":"sebastien.guimmara@gmail.com","sentAt":"2015-05-18T19:18:12Z","receivedAt":"2015-05-18T19:18:12Z","isPatch":true,"sender":{"key":"sebastien.guimmara@gmail.com","avatar":"https://gravatar.com/avatar/05d0b6a53712c5ed78d640976986949a3bda22c0dbf5ff13cabdd12c3f4094d6?d=mp&s=160"},"body":"No major improvement over v7 [1], this v8 drops the [common] and \n[commands] headers, instead relying on commented headers \n\"### command list\" and \"### common groups.\" to avoid ulgy looking \nsed/awk parsing.\n\ngenerate-cmdlist.awk: slight modification to allow parsing of those\nheaders.\n\ngit help: the colon at the end of each group is dropped.\n\nSummary: to help unfamiliar users grok the Git workflow, rework the \noutput of 'git help' by grouping the commands by theme:\n\n   The typical Git workflow includes:\n\n   start a working area (see also: git help tutorial)\n      clone      Clone a repository into a new directory\n      init       Create an empty Git repository or reinitialize an [...]\n\n   work on the current change (see also: git help everyday)\n      add        Add file contents to the index\n      mv         Move or rename a file, a directory, or a symlink\n      reset      Reset current HEAD to the specified state\n      rm         Remove files from the working tree and from the index\n   [...]\n\nThis series depends on bf990a2 (command-list: fix whitespace \ninconsistency)[2]\n\n[1] http://thread.gmane.org/gmane.comp.version-control.git/269167\n[2] http://thread.gmane.org/gmane.comp.version-control.git/268649\n\nEric Sunshine (2):\n  command-list: prepare machinery for upcoming \"common groups\" section\n  generate-cmdlist: parse common group commands\n\nSébastien Guimmara (3):\n  command-list.txt: add the common groups block\n  command-list.txt: drop the \"common\" tag\n  help: respect new common command grouping\n\n Documentation/cmd-list.perl |  4 ++++\n Makefile                    |  9 ++++----\n command-list.txt            | 53 +++++++++++++++++++++++++++------------------\n generate-cmdlist.awk        | 39 +++++++++++++++++++++++++++++++++\n generate-cmdlist.sh         | 23 --------------------\n help.c                      | 24 +++++++++++++++++++-\n 6 files changed, 103 insertions(+), 49 deletions(-)\n create mode 100644 generate-cmdlist.awk\n delete mode 100755 generate-cmdlist.sh\n\n-- \n2.4.0.GIT\n"},{"id":"261498","messageId":"1431976697-26288-2-git-send-email-sebastien.guimmara@gmail.com","threadId":"39361","inReplyTo":"1431976697-26288-1-git-send-email-sebastien.guimmara@gmail.com","subject":"[PATCH v8 1/5] command-list: prepare machinery for upcoming \"common groups\" section","fromName":"Sébastien Guimmara","fromEmail":"sebastien.guimmara@gmail.com","sentAt":"2015-05-18T19:18:13Z","receivedAt":"2015-05-18T19:18:13Z","isPatch":true,"sender":{"key":"sebastien.guimmara@gmail.com","avatar":"https://gravatar.com/avatar/05d0b6a53712c5ed78d640976986949a3bda22c0dbf5ff13cabdd12c3f4094d6?d=mp&s=160"},"body":"From: Eric Sunshine <sunshine@sunshineco.com>\n\nThe ultimate goal is for \"git help\" to classify common commands by\ngroup. Toward this end, a subsequent patch will add a new \"common\ngroups\" section to command-list.txt preceding the actual command list.\nAs preparation, teach existing command-list.txt parsing machinery, which\ndoesn't care about grouping, to skip over this upcoming \"common groups\"\nsection.\n\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\nSigned-off-by: Sébastien Guimmara <sebastien.guimmara@gmail.com>\n---\n Documentation/cmd-list.perl | 4 ++++\n Makefile                    | 5 +++--\n command-list.txt            | 3 ++-\n 3 files changed, 9 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/cmd-list.perl b/Documentation/cmd-list.perl\nindex 04f9977..5aa73cf 100755\n--- a/Documentation/cmd-list.perl\n+++ b/Documentation/cmd-list.perl\n@@ -38,6 +38,10 @@ sub format_one {\n \t}\n }\n \n+while (<>) {\n+\tlast if /^### command list/;\n+}\n+\n my %cmds = ();\n for (sort <>) {\n \tnext if /^#/;\ndiff --git a/Makefile b/Makefile\nindex 25a453b..5ed0acf 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -2454,7 +2454,7 @@ check-docs::\n \t\tesac ; \\\n \t\ttest -f \"Documentation/$$v.txt\" || \\\n \t\techo \"no doc: $$v\"; \\\n-\t\tsed -e '/^#/d' command-list.txt | \\\n+\t\tsed -e '1,/^### command list/d' -e '/^#/d' command-list.txt | \\\n \t\tgrep -q \"^$$v[ \t]\" || \\\n \t\tcase \"$$v\" in \\\n \t\tgit) ;; \\\n@@ -2462,7 +2462,8 @@ check-docs::\n \t\tesac ; \\\n \tdone; \\\n \t( \\\n-\t\tsed -e '/^#/d' \\\n+\t\tsed -e '1,/^### command list/d' \\\n+\t\t    -e '/^#/d' \\\n \t\t    -e 's/[ \t].*//' \\\n \t\t    -e 's/^/listed /' command-list.txt; \\\n \t\t$(MAKE) -C Documentation print-man1 | \\\ndiff --git a/command-list.txt b/command-list.txt\nindex 54d8d21..609b344 100644\n--- a/command-list.txt\n+++ b/command-list.txt\n@@ -1,4 +1,5 @@\n-# List of known git commands.\n+# do not molest the next line\n+### command list\n # command name                          category [deprecated] [common]\n git-add                                 mainporcelain common\n git-am                                  mainporcelain\n-- \n2.4.0.GIT\n"},{"id":"261500","messageId":"1431976697-26288-3-git-send-email-sebastien.guimmara@gmail.com","threadId":"39361","inReplyTo":"1431976697-26288-1-git-send-email-sebastien.guimmara@gmail.com","subject":"[PATCH v8 2/5] command-list.txt: add the common groups block","fromName":"Sébastien Guimmara","fromEmail":"sebastien.guimmara@gmail.com","sentAt":"2015-05-18T19:18:14Z","receivedAt":"2015-05-18T19:18:14Z","isPatch":true,"sender":{"key":"sebastien.guimmara@gmail.com","avatar":"https://gravatar.com/avatar/05d0b6a53712c5ed78d640976986949a3bda22c0dbf5ff13cabdd12c3f4094d6?d=mp&s=160"},"body":"The ultimate goal is for \"git help\" to display common commands in\ngroups rather than alphabetically. As a first step, define the\ngroups in a new block, and then assign a group to each\ncommon command.\n\nAdd a block at the beginning of command-list.txt:\n\n    init         start a working area (see also: git help tutorial)\n    worktree     work on the current change (see also:[...]\n    info         examine the history and state (see also: git [...]\n    history      grow, mark and tweak your history\n    remote       collaborate (see also: git help workflows)\n\nstoring information about common commands group, then map each common\ncommand to a group:\n\n    git-add          mainporcelain        common worktree\n\nHelped-by: Eric Sunshine <sunshine@sunshineco.com>\nHelped-by: Junio C Hamano <gitster@pobox.com>\nHelped-by:  Emma Jane Hogbin Westby <emma.westby@gmail.com>\nSigned-off-by: Sébastien Guimmara <sebastien.guimmara@gmail.com>\n---\n command-list.txt | 50 ++++++++++++++++++++++++++++++--------------------\n 1 file changed, 30 insertions(+), 20 deletions(-)\n\ndiff --git a/command-list.txt b/command-list.txt\nindex 609b344..c2bbdc1 100644\n--- a/command-list.txt\n+++ b/command-list.txt\n@@ -1,3 +1,13 @@\n+# common commands are grouped by themes output by 'git help'\n+# map each common command in the command list to one of these groups.\n+### common groups\n+init         start a working area (see also: git help tutorial)\n+worktree     work on the current change (see also: git help everyday)\n+info         examine the history and state (see also: git help revisions)\n+history      grow, mark and tweak your common history\n+remote       collaborate (see also: git help workflows)\n+\n+# List of known git commands.\n # do not molest the next line\n ### command list\n # command name                          category [deprecated] [common]\n@@ -7,24 +17,24 @@ git-annotate                            ancillaryinterrogators\n git-apply                               plumbingmanipulators\n git-archimport                          foreignscminterface\n git-archive                             mainporcelain\n-git-bisect                              mainporcelain common\n+git-bisect                              mainporcelain           common info\n git-blame                               ancillaryinterrogators\n-git-branch                              mainporcelain common\n+git-branch                              mainporcelain           common history\n git-bundle                              mainporcelain\n git-cat-file                            plumbinginterrogators\n git-check-attr                          purehelpers\n git-check-ignore                        purehelpers\n git-check-mailmap                       purehelpers\n-git-checkout                            mainporcelain common\n+git-checkout                            mainporcelain           common history\n git-checkout-index                      plumbingmanipulators\n git-check-ref-format                    purehelpers\n git-cherry                              ancillaryinterrogators\n git-cherry-pick                         mainporcelain\n git-citool                              mainporcelain\n git-clean                               mainporcelain\n-git-clone                               mainporcelain common\n+git-clone                               mainporcelain           common init\n git-column                              purehelpers\n-git-commit                              mainporcelain common\n+git-commit                              mainporcelain           common history\n git-commit-tree                         plumbingmanipulators\n git-config                              ancillarymanipulators\n git-count-objects                       ancillaryinterrogators\n@@ -36,14 +46,14 @@ git-cvsimport                           foreignscminterface\n git-cvsserver                           foreignscminterface\n git-daemon                              synchingrepositories\n git-describe                            mainporcelain\n-git-diff                                mainporcelain common\n+git-diff                                mainporcelain           common history\n git-diff-files                          plumbinginterrogators\n git-diff-index                          plumbinginterrogators\n git-diff-tree                           plumbinginterrogators\n git-difftool                            ancillaryinterrogators\n git-fast-export                         ancillarymanipulators\n git-fast-import                         ancillarymanipulators\n-git-fetch                               mainporcelain common\n+git-fetch                               mainporcelain           common remote\n git-fetch-pack                          synchingrepositories\n git-filter-branch                       ancillarymanipulators\n git-fmt-merge-msg                       purehelpers\n@@ -52,7 +62,7 @@ git-format-patch                        mainporcelain\n git-fsck                                ancillaryinterrogators\n git-gc                                  mainporcelain\n git-get-tar-commit-id                   ancillaryinterrogators\n-git-grep                                mainporcelain common\n+git-grep                                mainporcelain           common info\n git-gui                                 mainporcelain\n git-hash-object                         plumbingmanipulators\n git-help                                ancillaryinterrogators\n@@ -61,17 +71,17 @@ git-http-fetch                          synchelpers\n git-http-push                           synchelpers\n git-imap-send                           foreignscminterface\n git-index-pack                          plumbingmanipulators\n-git-init                                mainporcelain common\n+git-init                                mainporcelain           common init\n git-instaweb                            ancillaryinterrogators\n git-interpret-trailers                  purehelpers\n gitk                                    mainporcelain\n-git-log                                 mainporcelain common\n+git-log                                 mainporcelain           common info\n git-ls-files                            plumbinginterrogators\n git-ls-remote                           plumbinginterrogators\n git-ls-tree                             plumbinginterrogators\n git-mailinfo                            purehelpers\n git-mailsplit                           purehelpers\n-git-merge                               mainporcelain common\n+git-merge                               mainporcelain           common history\n git-merge-base                          plumbinginterrogators\n git-merge-file                          plumbingmanipulators\n git-merge-index                         plumbingmanipulators\n@@ -80,7 +90,7 @@ git-mergetool                           ancillarymanipulators\n git-merge-tree                          ancillaryinterrogators\n git-mktag                               plumbingmanipulators\n git-mktree                              plumbingmanipulators\n-git-mv                                  mainporcelain common\n+git-mv                                  mainporcelain           common worktree\n git-name-rev                            plumbinginterrogators\n git-notes                               mainporcelain\n git-p4                                  foreignscminterface\n@@ -91,11 +101,11 @@ git-parse-remote                        synchelpers\n git-patch-id                            purehelpers\n git-prune                               ancillarymanipulators\n git-prune-packed                        plumbingmanipulators\n-git-pull                                mainporcelain common\n-git-push                                mainporcelain common\n+git-pull                                mainporcelain           common remote\n+git-push                                mainporcelain           common remote\n git-quiltimport                         foreignscminterface\n git-read-tree                           plumbingmanipulators\n-git-rebase                              mainporcelain common\n+git-rebase                              mainporcelain           common history\n git-receive-pack                        synchelpers\n git-reflog                              ancillarymanipulators\n git-relink                              ancillarymanipulators\n@@ -104,28 +114,28 @@ git-repack                              ancillarymanipulators\n git-replace                             ancillarymanipulators\n git-request-pull                        foreignscminterface\n git-rerere                              ancillaryinterrogators\n-git-reset                               mainporcelain common\n+git-reset                               mainporcelain           common worktree\n git-revert                              mainporcelain\n git-rev-list                            plumbinginterrogators\n git-rev-parse                           ancillaryinterrogators\n-git-rm                                  mainporcelain common\n+git-rm                                  mainporcelain           common worktree\n git-send-email                          foreignscminterface\n git-send-pack                           synchingrepositories\n git-shell                               synchelpers\n git-shortlog                            mainporcelain\n-git-show                                mainporcelain common\n+git-show                                mainporcelain           common info\n git-show-branch                         ancillaryinterrogators\n git-show-index                          plumbinginterrogators\n git-show-ref                            plumbinginterrogators\n git-sh-i18n                             purehelpers\n git-sh-setup                            purehelpers\n git-stash                               mainporcelain\n-git-status                              mainporcelain common\n+git-status                              mainporcelain           common info\n git-stripspace                          purehelpers\n git-submodule                           mainporcelain\n git-svn                                 foreignscminterface\n git-symbolic-ref                        plumbingmanipulators\n-git-tag                                 mainporcelain common\n+git-tag                                 mainporcelain           common history\n git-unpack-file                         plumbinginterrogators\n git-unpack-objects                      plumbingmanipulators\n git-update-index                        plumbingmanipulators\n-- \n2.4.0.GIT\n"},{"id":"261501","messageId":"1431976697-26288-4-git-send-email-sebastien.guimmara@gmail.com","threadId":"39361","inReplyTo":"1431976697-26288-1-git-send-email-sebastien.guimmara@gmail.com","subject":"[PATCH v8 3/5] generate-cmdlist: parse common group commands","fromName":"Sébastien Guimmara","fromEmail":"sebastien.guimmara@gmail.com","sentAt":"2015-05-18T19:18:15Z","receivedAt":"2015-05-18T19:18:15Z","isPatch":true,"sender":{"key":"sebastien.guimmara@gmail.com","avatar":"https://gravatar.com/avatar/05d0b6a53712c5ed78d640976986949a3bda22c0dbf5ff13cabdd12c3f4094d6?d=mp&s=160"},"body":"From: Eric Sunshine <sunshine@sunshineco.com>\n\nParse the group block to create the array of group descriptions:\n\nstatic char *common_cmd_groups[] = {\n    N_(\"starting a working area\"),\n    N_(\"working on the current change\"),\n    N_(\"working with others\"),\n    N_(\"examining the history and state\"),\n    N_(\"growing, marking and tweaking your history\"),\n};\n\nthen map each element of common_cmds[] to a group via its index:\n\nstatic struct cmdname_help common_cmds[] = {\n    {\"add\", N_(\"Add file contents to the index\"), 1},\n    {\"branch\", N_(\"List, create, or delete branches\"), 4},\n    {\"checkout\", N_(\"Checkout a branch or paths to the ...\"), 4},\n    {\"clone\", N_(\"Clone a repository into a new directory\"), 0},\n    {\"commit\", N_(\"Record changes to the repository\"), 4},\n    ...\n};\n\nso that 'git help' can print those commands grouped by theme.\n\nOnly commands tagged with an attribute from the group block are emitted to\ncommon_cmds[].\n\n[commit message by Sébastien Guimmara <sebastien.guimmara@gmail.com>]\n\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\nSigned-off-by: Sébastien Guimmara <sebastien.guimmara@gmail.com>\n---\n Makefile             |  4 ++--\n generate-cmdlist.awk | 39 +++++++++++++++++++++++++++++++++++++++\n generate-cmdlist.sh  | 23 -----------------------\n 3 files changed, 41 insertions(+), 25 deletions(-)\n create mode 100644 generate-cmdlist.awk\n delete mode 100755 generate-cmdlist.sh\n\ndiff --git a/Makefile b/Makefile\nindex 5ed0acf..9da8687 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1693,10 +1693,10 @@ $(BUILT_INS): git$X\n \tln -s $< $@ 2>/dev/null || \\\n \tcp $< $@\n \n-common-cmds.h: ./generate-cmdlist.sh command-list.txt\n+common-cmds.h: generate-cmdlist.awk command-list.txt\n \n common-cmds.h: $(wildcard Documentation/git-*.txt)\n-\t$(QUIET_GEN)./generate-cmdlist.sh > $@+ && mv $@+ $@\n+\t$(QUIET_GEN)awk -f generate-cmdlist.awk command-list.txt > $@+ && mv $@+ $@\n \n SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\\\n \t$(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\\\ndiff --git a/generate-cmdlist.awk b/generate-cmdlist.awk\nnew file mode 100644\nindex 0000000..dbf1e6b\n--- /dev/null\n+++ b/generate-cmdlist.awk\n@@ -0,0 +1,39 @@\n+BEGIN {\n+\tprint \"/* Automatically generated by generate-cmdlist.awk */\\n\"\n+\tprint \"struct cmdname_help {\"\n+\tprint \"\\tchar name[16];\"\n+\tprint \"\\tchar help[80];\"\n+\tprint \"\\tunsigned char group;\"\n+\tprint \"};\\n\"\n+\tprint \"static char *common_cmd_groups[] = {\"\n+}\n+/### common groups/ {\n+\tstate = 1\n+}\n+/### command list/ {\n+\tprint \"};\\n\\nstatic struct cmdname_help common_cmds[] = {\"\n+\tstate = 2\n+}\n+/^#/ || /^[ \t]*$/ { next }\n+state == 2 {\n+\tfor (i = 2; i <= NF; i++)\n+\t\tif (grp[$i]) {\n+\t\t\tf = \"Documentation/\"$1\".txt\"\n+\t\t\twhile (getline s <f > 0)\n+\t\t\t\tif (match(s, $1\" - \")) {\n+\t\t\t\t\tt = substr(s, length($1\" - \") + 1)\n+\t\t\t\t\tbreak\n+\t\t\t\t}\n+\t\t\tclose(f)\n+\t\t\tprintf \"\\t{\\\"%s\\\", N_(\\\"%s\\\"), %s},\\n\",\n+\t\t\t\tsubstr($1, length(\"git-\") + 1), t, grp[$i] - 1\n+\t\t\tbreak\n+\t\t}\n+}\n+state == 1 {\n+\tgrp[$1] = ++n\n+\tsub($1\"[ \t][ \t]*\", \"\")\n+\tprintf \"\\tN_(\\\"%s\\\"),\\n\", $0\n+}\n+\n+END { print \"};\" }\ndiff --git a/generate-cmdlist.sh b/generate-cmdlist.sh\ndeleted file mode 100755\nindex 9a4c9b9..0000000\n--- a/generate-cmdlist.sh\n+++ /dev/null\n@@ -1,23 +0,0 @@\n-#!/bin/sh\n-\n-echo \"/* Automatically generated by $0 */\n-struct cmdname_help {\n-    char name[16];\n-    char help[80];\n-};\n-\n-static struct cmdname_help common_cmds[] = {\"\n-\n-sed -n -e 's/^git-\\([^ \t]*\\)[ \t].* common.*/\\1/p' command-list.txt |\n-sort |\n-while read cmd\n-do\n-     sed -n '\n-     /^NAME/,/git-'\"$cmd\"'/H\n-     ${\n-\t    x\n-\t    s/.*git-'\"$cmd\"' - \\(.*\\)/  {\"'\"$cmd\"'\", N_(\"\\1\")},/\n-\t    p\n-     }' \"Documentation/git-$cmd.txt\"\n-done\n-echo \"};\"\n-- \n2.4.0.GIT\n"},{"id":"261503","messageId":"1431976697-26288-5-git-send-email-sebastien.guimmara@gmail.com","threadId":"39361","inReplyTo":"1431976697-26288-1-git-send-email-sebastien.guimmara@gmail.com","subject":"[PATCH v8 4/5] command-list.txt: drop the \"common\" tag","fromName":"Sébastien Guimmara","fromEmail":"sebastien.guimmara@gmail.com","sentAt":"2015-05-18T19:18:16Z","receivedAt":"2015-05-18T19:18:16Z","isPatch":true,"sender":{"key":"sebastien.guimmara@gmail.com","avatar":"https://gravatar.com/avatar/05d0b6a53712c5ed78d640976986949a3bda22c0dbf5ff13cabdd12c3f4094d6?d=mp&s=160"},"body":"command-list.sh, retired in the previous patch, was the only\nconsumer of the \"common\" tag, so drop this now-unnecessary\nattribute.\n\nbefore:\n    git-add          mainporcelain        common worktree\n\nafter:\n    git-add          mainporcelain        worktree\n\nHelped-by: Eric Sunshine <sunshine@sunshineco.com>\nSigned-off-by: Sébastien Guimmara <sebastien.guimmara@gmail.com>\n---\n command-list.txt | 42 +++++++++++++++++++++---------------------\n 1 file changed, 21 insertions(+), 21 deletions(-)\n\ndiff --git a/command-list.txt b/command-list.txt\nindex c2bbdc1..080d6d9 100644\n--- a/command-list.txt\n+++ b/command-list.txt\n@@ -11,30 +11,30 @@ remote       collaborate (see also: git help workflows)\n # do not molest the next line\n ### command list\n # command name                          category [deprecated] [common]\n-git-add                                 mainporcelain common\n+git-add                                 mainporcelain           worktree\n git-am                                  mainporcelain\n git-annotate                            ancillaryinterrogators\n git-apply                               plumbingmanipulators\n git-archimport                          foreignscminterface\n git-archive                             mainporcelain\n-git-bisect                              mainporcelain           common info\n+git-bisect                              mainporcelain           info\n git-blame                               ancillaryinterrogators\n-git-branch                              mainporcelain           common history\n+git-branch                              mainporcelain           history\n git-bundle                              mainporcelain\n git-cat-file                            plumbinginterrogators\n git-check-attr                          purehelpers\n git-check-ignore                        purehelpers\n git-check-mailmap                       purehelpers\n-git-checkout                            mainporcelain           common history\n+git-checkout                            mainporcelain           history\n git-checkout-index                      plumbingmanipulators\n git-check-ref-format                    purehelpers\n git-cherry                              ancillaryinterrogators\n git-cherry-pick                         mainporcelain\n git-citool                              mainporcelain\n git-clean                               mainporcelain\n-git-clone                               mainporcelain           common init\n+git-clone                               mainporcelain           init\n git-column                              purehelpers\n-git-commit                              mainporcelain           common history\n+git-commit                              mainporcelain           history\n git-commit-tree                         plumbingmanipulators\n git-config                              ancillarymanipulators\n git-count-objects                       ancillaryinterrogators\n@@ -46,14 +46,14 @@ git-cvsimport                           foreignscminterface\n git-cvsserver                           foreignscminterface\n git-daemon                              synchingrepositories\n git-describe                            mainporcelain\n-git-diff                                mainporcelain           common history\n+git-diff                                mainporcelain           history\n git-diff-files                          plumbinginterrogators\n git-diff-index                          plumbinginterrogators\n git-diff-tree                           plumbinginterrogators\n git-difftool                            ancillaryinterrogators\n git-fast-export                         ancillarymanipulators\n git-fast-import                         ancillarymanipulators\n-git-fetch                               mainporcelain           common remote\n+git-fetch                               mainporcelain           remote\n git-fetch-pack                          synchingrepositories\n git-filter-branch                       ancillarymanipulators\n git-fmt-merge-msg                       purehelpers\n@@ -62,7 +62,7 @@ git-format-patch                        mainporcelain\n git-fsck                                ancillaryinterrogators\n git-gc                                  mainporcelain\n git-get-tar-commit-id                   ancillaryinterrogators\n-git-grep                                mainporcelain           common info\n+git-grep                                mainporcelain           info\n git-gui                                 mainporcelain\n git-hash-object                         plumbingmanipulators\n git-help                                ancillaryinterrogators\n@@ -71,17 +71,17 @@ git-http-fetch                          synchelpers\n git-http-push                           synchelpers\n git-imap-send                           foreignscminterface\n git-index-pack                          plumbingmanipulators\n-git-init                                mainporcelain           common init\n+git-init                                mainporcelain           init\n git-instaweb                            ancillaryinterrogators\n git-interpret-trailers                  purehelpers\n gitk                                    mainporcelain\n-git-log                                 mainporcelain           common info\n+git-log                                 mainporcelain           info\n git-ls-files                            plumbinginterrogators\n git-ls-remote                           plumbinginterrogators\n git-ls-tree                             plumbinginterrogators\n git-mailinfo                            purehelpers\n git-mailsplit                           purehelpers\n-git-merge                               mainporcelain           common history\n+git-merge                               mainporcelain           history\n git-merge-base                          plumbinginterrogators\n git-merge-file                          plumbingmanipulators\n git-merge-index                         plumbingmanipulators\n@@ -90,7 +90,7 @@ git-mergetool                           ancillarymanipulators\n git-merge-tree                          ancillaryinterrogators\n git-mktag                               plumbingmanipulators\n git-mktree                              plumbingmanipulators\n-git-mv                                  mainporcelain           common worktree\n+git-mv                                  mainporcelain           worktree\n git-name-rev                            plumbinginterrogators\n git-notes                               mainporcelain\n git-p4                                  foreignscminterface\n@@ -101,11 +101,11 @@ git-parse-remote                        synchelpers\n git-patch-id                            purehelpers\n git-prune                               ancillarymanipulators\n git-prune-packed                        plumbingmanipulators\n-git-pull                                mainporcelain           common remote\n-git-push                                mainporcelain           common remote\n+git-pull                                mainporcelain           remote\n+git-push                                mainporcelain           remote\n git-quiltimport                         foreignscminterface\n git-read-tree                           plumbingmanipulators\n-git-rebase                              mainporcelain           common history\n+git-rebase                              mainporcelain           history\n git-receive-pack                        synchelpers\n git-reflog                              ancillarymanipulators\n git-relink                              ancillarymanipulators\n@@ -114,28 +114,28 @@ git-repack                              ancillarymanipulators\n git-replace                             ancillarymanipulators\n git-request-pull                        foreignscminterface\n git-rerere                              ancillaryinterrogators\n-git-reset                               mainporcelain           common worktree\n+git-reset                               mainporcelain           worktree\n git-revert                              mainporcelain\n git-rev-list                            plumbinginterrogators\n git-rev-parse                           ancillaryinterrogators\n-git-rm                                  mainporcelain           common worktree\n+git-rm                                  mainporcelain           worktree\n git-send-email                          foreignscminterface\n git-send-pack                           synchingrepositories\n git-shell                               synchelpers\n git-shortlog                            mainporcelain\n-git-show                                mainporcelain           common info\n+git-show                                mainporcelain           info\n git-show-branch                         ancillaryinterrogators\n git-show-index                          plumbinginterrogators\n git-show-ref                            plumbinginterrogators\n git-sh-i18n                             purehelpers\n git-sh-setup                            purehelpers\n git-stash                               mainporcelain\n-git-status                              mainporcelain           common info\n+git-status                              mainporcelain           info\n git-stripspace                          purehelpers\n git-submodule                           mainporcelain\n git-svn                                 foreignscminterface\n git-symbolic-ref                        plumbingmanipulators\n-git-tag                                 mainporcelain           common history\n+git-tag                                 mainporcelain           history\n git-unpack-file                         plumbinginterrogators\n git-unpack-objects                      plumbingmanipulators\n git-update-index                        plumbingmanipulators\n-- \n2.4.0.GIT\n"},{"id":"261502","messageId":"1431976697-26288-6-git-send-email-sebastien.guimmara@gmail.com","threadId":"39361","inReplyTo":"1431976697-26288-1-git-send-email-sebastien.guimmara@gmail.com","subject":"[PATCH v8 5/5] help: respect new common command grouping","fromName":"Sébastien Guimmara","fromEmail":"sebastien.guimmara@gmail.com","sentAt":"2015-05-18T19:18:17Z","receivedAt":"2015-05-18T19:18:17Z","isPatch":true,"sender":{"key":"sebastien.guimmara@gmail.com","avatar":"https://gravatar.com/avatar/05d0b6a53712c5ed78d640976986949a3bda22c0dbf5ff13cabdd12c3f4094d6?d=mp&s=160"},"body":"'git help' shows common commands in alphabetical order:\n\nThe most commonly used git commands are:\n   add        Add file contents to the index\n   bisect     Find by binary search the change that introduced a bug\n   branch     List, create, or delete branches\n   checkout   Checkout a branch or paths to the working tree\n   clone      Clone a repository into a new directory\n   commit     Record changes to the repository\n   [...]\n\nwithout any indication of how commands relate to high-level\nconcepts or each other. Revise the output to explain their relationship\nwith the typical Git workflow:\n\nThe typical Git workflow includes:\n\nstart a working area (see also: git help tutorial)\n   clone      Clone a repository into a new directory\n   init       Create an empty Git repository or reinitialize [...]\n\nwork on the current change (see also: git help everyday)\n   add        Add file contents to the index\n   mv         Move or rename a file, a directory, or a symlink\n   reset      Reset current HEAD to the specified state\n   rm         Remove files from the working tree and from the index\n\nexamine the history and state (see also: git help revisions)\n   log        Show commit logs\n   status     Show the working tree status\n\n   [...]\n\nHelped-by: Eric Sunshine <sunshine@sunshineco.com>\nSigned-off-by: Sébastien Guimmara <sebastien.guimmara@gmail.com>\n---\n help.c | 24 +++++++++++++++++++++++-\n 1 file changed, 23 insertions(+), 1 deletion(-)\n\ndiff --git a/help.c b/help.c\nindex 2072a87..71027b7 100644\n--- a/help.c\n+++ b/help.c\n@@ -218,17 +218,39 @@ void list_commands(unsigned int colopts,\n \t}\n }\n \n+int cmd_group_cmp(const void *elem1, const void *elem2)\n+{\n+\tconst struct cmdname_help *e1 = elem1;\n+\tconst struct cmdname_help *e2 = elem2;\n+\n+\tif (e1->group < e2->group)\n+\t\treturn -1;\n+\tif (e1->group > e2->group)\n+\t\treturn 1;\n+\treturn strcmp(e1->name, e2->name);\n+}\n+\n void list_common_cmds_help(void)\n {\n \tint i, longest = 0;\n+\tint current_grp = -1;\n \n \tfor (i = 0; i < ARRAY_SIZE(common_cmds); i++) {\n \t\tif (longest < strlen(common_cmds[i].name))\n \t\t\tlongest = strlen(common_cmds[i].name);\n \t}\n \n-\tputs(_(\"The most commonly used git commands are:\"));\n+\tqsort(common_cmds, ARRAY_SIZE(common_cmds),\n+\t\tsizeof(common_cmds[0]), cmd_group_cmp);\n+\n+\tputs(_(\"The typical Git workflow includes:\"));\n+\n \tfor (i = 0; i < ARRAY_SIZE(common_cmds); i++) {\n+\t\tif (common_cmds[i].group != current_grp) {\n+\t\t\tprintf(\"\\n%s\\n\", _(common_cmd_groups[common_cmds[i].group]));\n+\t\t\tcurrent_grp = common_cmds[i].group;\n+\t\t}\n+\n \t\tprintf(\"   %s   \", common_cmds[i].name);\n \t\tmput_char(' ', longest - strlen(common_cmds[i].name));\n \t\tputs(_(common_cmds[i].help));\n-- \n2.4.0.GIT\n"},{"id":"261518","messageId":"xmqqr3qda7kx.fsf@gitster.dls.corp.google.com","threadId":"39361","inReplyTo":"1431976697-26288-6-git-send-email-sebastien.guimmara@gmail.com","subject":"Re: [PATCH v8 5/5] help: respect new common command grouping","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-18T21:39:42Z","receivedAt":"2015-05-18T21:39:42Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Sébastien Guimmara  <sebastien.guimmara@gmail.com> writes:\n\n> 'git help' shows common commands in alphabetical order:\n>\n> The most commonly used git commands are:\n>    add        Add file contents to the index\n>    bisect     Find by binary search the change that introduced a bug\n>    branch     List, create, or delete branches\n>    checkout   Checkout a branch or paths to the working tree\n>    clone      Clone a repository into a new directory\n>    commit     Record changes to the repository\n>    [...]\n>\n> without any indication of how commands relate to high-level\n> concepts or each other. Revise the output to explain their relationship\n> with the typical Git workflow:\n>\n> The typical Git workflow includes:\n>\n> start a working area (see also: git help tutorial)\n>    clone      Clone a repository into a new directory\n>    init       Create an empty Git repository or reinitialize [...]\n>\n> work on the current change (see also: git help everyday)\n>    add        Add file contents to the index\n>    mv         Move or rename a file, a directory, or a symlink\n>    reset      Reset current HEAD to the specified state\n>    rm         Remove files from the working tree and from the index\n>\n> examine the history and state (see also: git help revisions)\n>    log        Show commit logs\n>    status     Show the working tree status\n>\n>    [...]\n>\n> Helped-by: Eric Sunshine <sunshine@sunshineco.com>\n> Signed-off-by: Sébastien Guimmara <sebastien.guimmara@gmail.com>\n> ---\n\nI cannot exactly pinpoint what bothers me, but \"The typical Git\nworkflow includes:\" sounds a bit awkward.\n\nWhat does a workflow \"include\"?  What are components included in a\nworkflow?  Are \"starting a repository\", \"working on a single thing\",\n\"collabolating\", etc. components that are incuded in a workflow?\n\nIf so, the fact that \"clone\", \"init\", etc. are \"commands that are\ncommonly used in each component of the workflow\" is a more important\nthing to say; in other words, the header does not explain what list\nit is presenting the user.\n\nOr does a workflow consists of \"clone\", \"init\", \"add\", \"mv\", etc.\nthat are included in it?  Then it is left unexplained what the\nsection headings stand for.\n\nPerhaps something like\n\n\tThese are common Git commands used in various situations:\n\nmay lessen the uneasiness I felt above.  I dunno.\n\nOther than that, this round looks ready for 'next'.\n\nI am not absolutely sure if new dependency on \"awk\" will not present\nportability issues, though.  So far we only used it in scripts in\nthe fringes and only a few tests.\n\nThanks.\n"},{"id":"261530","messageId":"20150519004356.GA12854@flurp.local","threadId":"39361","inReplyTo":"xmqqr3qda7kx.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v8 5/5] help: respect new common command grouping","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2015-05-19T00:43:56Z","receivedAt":"2015-05-19T00:43:56Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, May 18, 2015 at 02:39:42PM -0700, Junio C Hamano wrote:\n> Sébastien Guimmara  <sebastien.guimmara@gmail.com> writes:\n> > 'git help' shows common commands in alphabetical order:\n> > [...]\n> > without any indication of how commands relate to high-level\n> > concepts or each other. Revise the output to explain their relationship\n> > with the typical Git workflow:\n> > [...]\n> > The typical Git workflow includes:\n> >\n> > Helped-by: Eric Sunshine <sunshine@sunshineco.com>\n> > Signed-off-by: Sébastien Guimmara <sebastien.guimmara@gmail.com>\n> \n> I cannot exactly pinpoint what bothers me, but \"The typical Git\n> workflow includes:\" sounds a bit awkward.\n> What does a workflow \"include\"? [...]\n> \n> Other than that, this round looks ready for 'next'.\n\nI came to the same conclusion. FWIW, the entire series is:\n\nReviewed-by: Eric Sunshine <sunshine@sunshineco.com>\n\n> I am not absolutely sure if new dependency on \"awk\" will not present\n> portability issues, though.  So far we only used it in scripts in\n> the fringes and only a few tests.\n\nThe awk script restricts itself to POSIX, and I did test it on Linux,\nMac OS X, and FreeBSD, so it seems pretty portable. However, if it\nworries you sufficiently, here's the equivalent Perl version:\n\n--- >8 ---\nFrom: Eric Sunshine <sunshine@sunshineco.com>\nSubject: [PATCH 3/5] generate-cmdlist: parse common group commands\n\nParse the group block to create the array of group descriptions:\n\nstatic char *common_cmd_groups[] = {\n    N_(\"starting a working area\"),\n    N_(\"working on the current change\"),\n    N_(\"working with others\"),\n    N_(\"examining the history and state\"),\n    N_(\"growing, marking and tweaking your history\"),\n};\n\nthen map each element of common_cmds[] to a group via its index:\n\nstatic struct cmdname_help common_cmds[] = {\n    {\"add\", N_(\"Add file contents to the index\"), 1},\n    {\"branch\", N_(\"List, create, or delete branches\"), 4},\n    {\"checkout\", N_(\"Checkout a branch or paths to the ...\"), 4},\n    {\"clone\", N_(\"Clone a repository into a new directory\"), 0},\n    {\"commit\", N_(\"Record changes to the repository\"), 4},\n    ...\n};\n\nso that 'git help' can print those commands grouped by theme.\n\nOnly commands tagged with an attribute from the group block are emitted to\ncommon_cmds[].\n\n[commit message by Sébastien Guimmara <sebastien.guimmara@gmail.com>]\n\nSigned-off-by: Eric Sunshine <sunshine@sunshineco.com>\n---\n Makefile              |  4 ++--\n generate-cmdlist.perl | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++\n generate-cmdlist.sh   | 23 -----------------------\n 3 files changed, 52 insertions(+), 25 deletions(-)\n create mode 100755 generate-cmdlist.perl\n delete mode 100755 generate-cmdlist.sh\n\ndiff --git a/Makefile b/Makefile\nindex 5ed0acf..c133a96 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1693,10 +1693,10 @@ $(BUILT_INS): git$X\n \tln -s $< $@ 2>/dev/null || \\\n \tcp $< $@\n \n-common-cmds.h: ./generate-cmdlist.sh command-list.txt\n+common-cmds.h: generate-cmdlist.perl command-list.txt\n \n common-cmds.h: $(wildcard Documentation/git-*.txt)\n-\t$(QUIET_GEN)./generate-cmdlist.sh > $@+ && mv $@+ $@\n+\t$(QUIET_GEN)$(PERL_PATH) generate-cmdlist.perl command-list.txt > $@+ && mv $@+ $@\n \n SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\\\n \t$(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\\\ndiff --git a/generate-cmdlist.perl b/generate-cmdlist.perl\nnew file mode 100755\nindex 0000000..31516e3\n--- /dev/null\n+++ b/generate-cmdlist.perl\n@@ -0,0 +1,50 @@\n+#!/usr/bin/perl\n+use strict;\n+use warnings;\n+\n+print <<\"EOT\";\n+/* Automatically generated by $0 */\n+\n+struct cmdname_help {\n+\tchar name[16];\n+\tchar help[80];\n+\tunsigned char group;\n+};\n+\n+static char *common_cmd_groups[] = {\n+EOT\n+\n+my $n = 0;\n+my %grp;\n+while (<>) {\n+\tlast if /^### command list/;\n+\tnext if (1../^### common groups/) || /^#/ || /^\\s*$/;\n+\tchop;\n+\tmy ($k, $v) = split ' ', $_, 2;\n+\t$grp{$k} = $n++;\n+\tprint \"\\tN_(\\\"$v\\\"),\\n\";\n+}\n+\n+print \"};\\n\\nstatic struct cmdname_help common_cmds[] = {\\n\";\n+\n+while (<>) {\n+\tnext if /^#/ || /^\\s*$/;\n+\tmy @tags = split;\n+\tmy $cmd = shift @tags;\n+\tfor my $t (@tags) {\n+\t\tif (exists $grp{$t}) {\n+\t\t\tmy $s;\n+\t\t\topen my $f, '<', \"Documentation/$cmd.txt\" or die;\n+\t\t\twhile (<$f>) {\n+\t\t\t\t($s) = /^$cmd - (.+)$/;\n+\t\t\t\tlast if $s;\n+\t\t\t}\n+\t\t\tclose $f;\n+\t\t\t$cmd =~ s/^git-//;\n+\t\t\tprint \"\\t{\\\"$cmd\\\", N_(\\\"$s\\\"), $grp{$t}},\\n\";\n+\t\t\tlast;\n+\t\t}\n+\t}\n+}\n+\n+print \"};\\n\";\ndiff --git a/generate-cmdlist.sh b/generate-cmdlist.sh\ndeleted file mode 100755\nindex 9a4c9b9..0000000\n--- a/generate-cmdlist.sh\n+++ /dev/null\n@@ -1,23 +0,0 @@\n-#!/bin/sh\n-\n-echo \"/* Automatically generated by $0 */\n-struct cmdname_help {\n-    char name[16];\n-    char help[80];\n-};\n-\n-static struct cmdname_help common_cmds[] = {\"\n-\n-sed -n -e 's/^git-\\([^ \t]*\\)[ \t].* common.*/\\1/p' command-list.txt |\n-sort |\n-while read cmd\n-do\n-     sed -n '\n-     /^NAME/,/git-'\"$cmd\"'/H\n-     ${\n-\t    x\n-\t    s/.*git-'\"$cmd\"' - \\(.*\\)/  {\"'\"$cmd\"'\", N_(\"\\1\")},/\n-\t    p\n-     }' \"Documentation/git-$cmd.txt\"\n-done\n-echo \"};\"\n-- \n2.4.1.260.ga2776d4\n\n--- >8 ---\n"},{"id":"261560","messageId":"xmqq1tica6rk.fsf@gitster.dls.corp.google.com","threadId":"39361","inReplyTo":"20150519004356.GA12854@flurp.local","subject":"Re: [PATCH v8 5/5] help: respect new common command grouping","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-19T16:09:35Z","receivedAt":"2015-05-19T16:09:35Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> The awk script restricts itself to POSIX, and I did test it on Linux,\n> Mac OS X, and FreeBSD, so it seems pretty portable.\n\nI was worried more about some people only having gawk while others\nwith mawk and yet others nawk, etc., without having one of them\nunder the canonical name \"awk\".  It's nothing what\n\n    $ make AWK=mawk\n\nor its config.mak equivalent cannot fix, but still bothers me a bit.\n"},{"id":"261565","messageId":"CAPig+cS15yzwbcdb-yLH5QiMoxa0utmaJaDDz=W9WfWd+PL37A@mail.gmail.com","threadId":"39361","inReplyTo":"xmqq1tica6rk.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v8 5/5] help: respect new common command grouping","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2015-05-19T16:35:58Z","receivedAt":"2015-05-19T16:35:58Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, May 19, 2015 at 12:09 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Eric Sunshine <sunshine@sunshineco.com> writes:\n>\n>> The awk script restricts itself to POSIX, and I did test it on Linux,\n>> Mac OS X, and FreeBSD, so it seems pretty portable.\n>\n> I was worried more about some people only having gawk while others\n> with mawk and yet others nawk, etc., without having one of them\n> under the canonical name \"awk\".  It's nothing what\n>\n>     $ make AWK=mawk\n>\n> or its config.mak equivalent cannot fix, but still bothers me a bit.\n\nIn that case, perhaps we should go with the Perl version, which, given\nthat more people (these days) are familiar with Perl than awk, is less\nlikely to be a maintenance burden.\n"},{"id":"261575","messageId":"555B799C.3000606@gmail.com","threadId":"39361","inReplyTo":"xmqqr3qda7kx.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH v8 5/5] help: respect new common command grouping","fromName":"Sébastien Guimmara","fromEmail":"sebastien.guimmara@gmail.com","sentAt":"2015-05-19T17:57:48Z","receivedAt":"2015-05-19T17:57:48Z","isPatch":true,"sender":{"key":"sebastien.guimmara@gmail.com","avatar":"https://gravatar.com/avatar/05d0b6a53712c5ed78d640976986949a3bda22c0dbf5ff13cabdd12c3f4094d6?d=mp&s=160"},"body":"On 05/18/2015 11:39 PM, Junio C Hamano wrote:\n> I cannot exactly pinpoint what bothers me, but \"The typical Git\n> workflow includes:\" sounds a bit awkward.\n>\n> What does a workflow \"include\"?  What are components included in a\n> workflow?  Are \"starting a repository\", \"working on a single thing\",\n> \"collabolating\", etc. components that are incuded in a workflow?\n>\n> If so, the fact that \"clone\", \"init\", etc. are \"commands that are\n> commonly used in each component of the workflow\" is a more important\n> thing to say; in other words, the header does not explain what list\n> it is presenting the user.\n>\n> Or does a workflow consists of \"clone\", \"init\", \"add\", \"mv\", etc.\n> that are included in it?  Then it is left unexplained what the\n> section headings stand for.\n>\n> Perhaps something like\n>\n> \tThese are common Git commands used in various situations:\n>\n> may lessen the uneasiness I felt above.  I dunno.\n\nThis sounds better indeed.\n\n>\n> Other than that, this round looks ready for 'next'.\n>\n> I am not absolutely sure if new dependency on \"awk\" will not present\n> portability issues, though.  So far we only used it in scripts in\n> the fringes and only a few tests.\n>\n> Thanks.\n>\n\nWe can use Eric's perl version instead of the awk one.\n\nShould I make another series or amend this one ?\n\nThank you.\n"},{"id":"261578","messageId":"xmqq617o8m5o.fsf@gitster.dls.corp.google.com","threadId":"39361","inReplyTo":"CAPig+cS15yzwbcdb-yLH5QiMoxa0utmaJaDDz=W9WfWd+PL37A@mail.gmail.com","subject":"Re: [PATCH v8 5/5] help: respect new common command grouping","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-05-19T18:20:03Z","receivedAt":"2015-05-19T18:20:03Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eric Sunshine <sunshine@sunshineco.com> writes:\n\n> On Tue, May 19, 2015 at 12:09 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Eric Sunshine <sunshine@sunshineco.com> writes:\n>>\n>>> The awk script restricts itself to POSIX, and I did test it on Linux,\n>>> Mac OS X, and FreeBSD, so it seems pretty portable.\n>>\n>> I was worried more about some people only having gawk while others\n>> with mawk and yet others nawk, etc., without having one of them\n>> under the canonical name \"awk\".  It's nothing what\n>>\n>>     $ make AWK=mawk\n>>\n>> or its config.mak equivalent cannot fix, but still bothers me a bit.\n>\n> In that case, perhaps we should go with the Perl version, which, given\n> that more people (these days) are familiar with Perl than awk, is less\n> likely to be a maintenance burden.\n\nAs long as we all can agree that the long-term direction we want to\ngo in is to remove dependency on awk, that's fine by me.\n\nThat means a small awk scriptlets in t/ and elsewhere need to be\nrethought, though.\n\nThanks.\n"}]}