2 # This file is part of NIT ( http://www.nitlanguage.org ).
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 # Check missing signed-off-by in commits
18 if test "$#" -lt
2; then
19 echo "Usage: checksignedoffby from to"
29 for ref
in `git rev-list --no-merges "$from".."$to"`; do
30 # What is the expected?
31 sig
=`git --no-pager show -s --format='Signed-off-by: %an <%ae>' $ref`
32 # Do we found some signed-off-by?
33 git
--no
-pager show
-s
--format
="%b" $ref |
grep "^Signed-off-by:" > check_signedoff_list.out ||
{
34 git
--no
-pager show
-s
--oneline
$ref
39 # Do we found the expected thing?
40 cat check_signedoff_list.out |
grep -q
"^$sig\$" && continue
41 git
--no
-pager show
-s
--oneline
$ref
42 echo "Bad or missing $sig; got:"
43 cat check_signedoff_list.out
47 rm check_signedoff_list.out
2> /dev
/null