From ab49c53f4b019da37ade163badcfb5bd02d9bb21 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Sat, 21 Dec 2013 00:59:56 -0500 Subject: [PATCH] Added gitlog-to-{authors,news} These will be used to generate, respectively, the AUTHORS and NEWS files that are a part of GNU distributions. --- tools/gitlog-to-authors | 23 +++++++++++++++++++++++ tools/gitlog-to-news | 27 +++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100755 tools/gitlog-to-authors create mode 100755 tools/gitlog-to-news diff --git a/tools/gitlog-to-authors b/tools/gitlog-to-authors new file mode 100755 index 0000000..419c05f --- /dev/null +++ b/tools/gitlog-to-authors @@ -0,0 +1,23 @@ +#!/bin/sh +# Outputs all contributor names and e-mail addresses. +# +# Copyright (C) 2013 Mike Gerwitz +# +# This file is part of ease.js. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +## + +git shortlog --summary --email \ + | cut -f2- diff --git a/tools/gitlog-to-news b/tools/gitlog-to-news new file mode 100755 index 0000000..c14c45f --- /dev/null +++ b/tools/gitlog-to-news @@ -0,0 +1,27 @@ +#!/bin/sh +# Formats and concatenates long commit messages +# +# Copyright (C) 2013 Mike Gerwitz +# +# This file is part of ease.js. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +## + +# format long commit messages +git log --log-size --format="%H%n%B" \ + | grep -A1 '^log size \([5-9][0-9]\{2,\}\|[0-9]\{4,\}\)$' \ + | grep -o '^[a-z0-9]\+$' \ + | xargs -n1 git log -n1 --date=rfc --no-notes \ + | awk '/^commit/ && NR!=1 { printf "\n\n" } { print }'