[ARVADOS-DEV] updated: e4bcdc4ace33d30c7d672d5e508c544db8c8c582
Git user
git at public.curoverse.com
Mon Jan 8 22:06:49 EST 2018
Summary of changes:
git/hooks/coding-standards.sh | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
via e4bcdc4ace33d30c7d672d5e508c544db8c8c582 (commit)
from 40a2b8d1130df25ea9ca05af162356a9ef67d85f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit e4bcdc4ace33d30c7d672d5e508c544db8c8c582
Author: Ward Vandewege <ward at curoverse.com>
Date: Mon Jan 8 22:05:28 2018 -0500
When a branch is being deleted, do not enforce the commit blacklist in
all the commits that are being deleted.
refs #11020
Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <wvandewege at veritasgenetics.com>
diff --git a/git/hooks/coding-standards.sh b/git/hooks/coding-standards.sh
index a8f615e..d74c705 100755
--- a/git/hooks/coding-standards.sh
+++ b/git/hooks/coding-standards.sh
@@ -18,7 +18,21 @@ $newrev = ARGV[2]
$user = ENV['USER']
def blacklist bl
- all_revs = `git rev-list #{$oldrev}..#{$newrev}`.split("\n")
+ if ($newrev[0,6] == '000000')
+ # A branch is being deleted. Do not check old commits for DCO signoff!
+ all_revs = []
+ elsif ($oldrev[0,6] == '000000')
+ if $refname != 'refs/heads/master'
+ # A new branch was pushed. Check all new commits in this branch.
+ all_revs = `git log --pretty=format:%H master..#{$newrev}`.split("\n")
+ else
+ # When does this happen?
+ all_revs = [$newrev]
+ end
+ else
+ all_revs = `git rev-list #{$oldrev}..#{$newrev}`.split("\n")
+ end
+
all_revs.each do |rev|
bl.each do |b|
if rev == b
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list