OSDN Git Service

admin: chmod +x for script files.
[linuxjm/jm.git] / admin / git2changelog.sed
1 #
2 # This sed script converts git log output to ChangeLog style.
3 # http://www.mail-archive.com/twmode-users@lists.sourceforge.net/msg00115.html
4 #
5 # Sample command line as follows:
6 # git log --topo-order --pretty=format:"=%ai%n%an%n<%ae>%n%n%s%n%b" | \
7 #    sed -f git-to-changelog.sed
8 #
9
10 /^[^=].\{72,\}/{
11   :loop
12   s/^\(.\{0,70\}[^ ]\) \(.*\)$/\t\1\n\2/
13   T too-long
14   P
15   D
16   b loop
17   :too-long
18   s/^/\t/
19   b
20 }
21 s/^\([^=\t]\)/\t\1/
22 /^=/{
23   s/^=\([^ ]*\) .*$/\1/
24   N
25   N
26   s/\n/  /g
27 }