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