projects
/
git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Merge branch 'ab/config-based-hooks-base' into seen
[git]
/
generate-hooklist.sh
1
#!/bin/sh
2
3
echo "/* Automatically generated by generate-hooklist.sh */"
4
5
print_hook_list () {
6
cat <<EOF
7
static const char *hook_name_list[] = {
8
EOF
9
perl -ne '
10
chomp;
11
@l[$.] = $_;
12
push @h => $l[$. - 1] if /^~~~+$/s;
13
END {
14
print qq[\t"$_",\n] for sort @h;
15
}
16
' <Documentation/githooks.txt
17
cat <<EOF
18
NULL,
19
};
20
EOF
21
}
22
23
echo
24
print_hook_list