generate-cmdlist.shon commit Add post-merge hook, related documentation, and tests. (4623291)
   1#!/bin/sh
   2
   3echo "/* Automatically generated by $0 */
   4struct cmdname_help
   5{
   6    char name[16];
   7    char help[80];
   8};
   9
  10static struct cmdname_help common_cmds[] = {"
  11
  12sort <<\EOF |
  13add
  14apply
  15archive
  16bisect
  17branch
  18checkout
  19cherry-pick
  20clone
  21commit
  22diff
  23fetch
  24grep
  25init
  26log
  27merge
  28mv
  29prune
  30pull
  31push
  32rebase
  33reset
  34revert
  35rm
  36show
  37show-branch
  38status
  39tag
  40EOF
  41while read cmd
  42do
  43     sed -n '
  44     /NAME/,/git-'"$cmd"'/H
  45     ${
  46            x
  47            s/.*git-'"$cmd"' - \(.*\)/  {"'"$cmd"'", "\1"},/
  48            p
  49     }' "Documentation/git-$cmd.txt"
  50done
  51echo "};"