summaryrefslogtreecommitdiffstats
path: root/scripts/check-git-log.sh
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-12-08 14:07:29 +0100
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-12-08 14:10:05 +0100
commit6b3e017e5d25f15da73f7700f7f2ac553ef1a2e9 (patch)
tree1b1fb3f903b2282e261ade69e3c17952b3fd3464 /scripts/check-git-log.sh
parent32e04ea00cd159613e04acef75e52bfca6eeff2f (diff)
Imported Upstream version 16.11
Change-Id: I1944c65ddc88a9ad70f8c0eb6731552b84fbcb77 Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'scripts/check-git-log.sh')
-rwxr-xr-xscripts/check-git-log.sh33
1 files changed, 18 insertions, 15 deletions
diff --git a/scripts/check-git-log.sh b/scripts/check-git-log.sh
index e416aea1..5f8a9fc5 100755
--- a/scripts/check-git-log.sh
+++ b/scripts/check-git-log.sh
@@ -49,11 +49,11 @@ fi
range=${1:-origin/master..}
-commits=$(git log --format='%h' $range)
-headlines=$(git log --format='%s' $range)
-bodylines=$(git log --format='%b' $range)
-fixes=$(git log --format='%h %s' $range | grep -i ': *fix' | cut -d' ' -f1)
-tags=$(git log --format='%b' $range | grep -i -e 'by *:' -e 'fix.*:')
+commits=$(git log --format='%h' --reverse $range)
+headlines=$(git log --format='%s' --reverse $range)
+bodylines=$(git log --format='%b' --reverse $range)
+fixes=$(git log --format='%h %s' --reverse $range | grep -i ': *fix' | cut -d' ' -f1)
+tags=$(git log --format='%b' --reverse $range | grep -i -e 'by *:' -e 'fix.*:')
bytag='\(Reported\|Suggested\|Signed-off\|Acked\|Reviewed\|Tested\)-by:'
# check headline format (spacing, no punctuation, no code)
@@ -112,20 +112,23 @@ bad=$(echo "$headlines" | grep -E --color=always \
-e '\<[hsf]w\>' \
-e '\<l[234]\>' \
-e ':.*\<api\>' \
+ -e ':.*\<arm\>' \
+ -e ':.*\<armv7\>' \
+ -e ':.*\<armv8\>' \
-e ':.*\<dma\>' \
- -e ':.*\<pci\>' \
- -e ':.*\<mtu\>' \
+ -e ':.*\<freebsd\>' \
+ -e ':.*\<linux\>' \
+ -e ':.*\<lro\>' \
-e ':.*\<mac\>' \
+ -e ':.*\<mtu\>' \
+ -e ':.*\<nic\>' \
-e ':.*\<numa\>' \
- -e ':.*\<vlan\>' \
+ -e ':.*\<pci\>' \
+ -e ':.*\<pmd\>' \
-e ':.*\<rss\>' \
- -e ':.*\<freebsd\>' \
- -e ':.*\<linux\>' \
- -e ':.*\<tilegx\>' \
-e ':.*\<tile-gx\>' \
- -e ':.*\<arm\>' \
- -e ':.*\<armv7\>' \
- -e ':.*\<armv8\>' \
+ -e ':.*\<tilegx\>' \
+ -e ':.*\<vlan\>' \
| sed 's,^,\t,')
[ -z "$bad" ] || printf "Wrong headline lowercase:\n$bad\n"
@@ -180,7 +183,7 @@ IFS='
fixtags=$(echo "$tags" | grep '^Fixes: ')
bad=$(for fixtag in $fixtags ; do
hash=$(echo "$fixtag" | sed 's,^Fixes: \([0-9a-f]*\).*,\1,')
- if git branch --contains $hash | grep -q '^\*' ; then
+ if git branch --contains $hash 2>&- | grep -q '^\*' ; then
good="Fixes: $hash "$(git log --format='("%s")' -1 $hash 2>&-)
else
good="reference not in current branch"