From 419633884c2cdbcb827c0b43b461ffa17b5f5582 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Sat, 13 Feb 2016 12:01:34 +0000 Subject: check-copyright-year: Check author date instead of commiter date Now if a patch is sent to review, on year 20xx, and then merged on year 20xx+1, the script will check the former instead of the latter. Change-Id: I5bb9ac05f1fb3fa4a51a051351e754c524897ea1 --- scripts/check-copyright-year | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/check-copyright-year b/scripts/check-copyright-year index 58d9e66b..c33c3c52 100755 --- a/scripts/check-copyright-year +++ b/scripts/check-copyright-year @@ -2,7 +2,7 @@ # # Does the copyright statement include the year of the latest git commit? # -# Copyright (C) 2012, 2014-2015 Codethink Limited +# Copyright (C) 2012, 2014-2016 Codethink Limited # # 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 @@ -88,7 +88,7 @@ class CheckCopyrightYear(cliapp.Application): self.all_ok = self.all_ok and ok def get_git_commit_year(self, filename): - out = self.runcmd(['git', 'log', '-1', '--format=format:%cd', + out = self.runcmd(['git', 'log', '-1', '--format=format:%ad', filename]) if not out: return None -- cgit v1.2.1