From 40a2b8d1130df25ea9ca05af162356a9ef67d85f Mon Sep 17 00:00:00 2001 From: Ward Vandewege Date: Mon, 8 Jan 2018 21:52:45 -0500 Subject: [PATCH] When a branch is being deleted, do not enforce the DCO signoff in all the commits that are being deleted. refs #11020 Arvados-DCO-1.1-Signed-off-by: Ward Vandewege --- git/hooks/enforce-dco-signoff.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git/hooks/enforce-dco-signoff.rb b/git/hooks/enforce-dco-signoff.rb index c6245d2..ab93401 100755 --- a/git/hooks/enforce-dco-signoff.rb +++ b/git/hooks/enforce-dco-signoff.rb @@ -22,8 +22,8 @@ $arvados_DCO = /Arvados-DCO-1.1-Signed-off-by:/ # enforced DCO signoff in commit message def check_message_format if ($newrev[0,6] == '000000') - # A branch is being deleted - all_revs = [$oldrev] + # 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. -- 2.30.2