path: root/src/build/tools
diff options
authorcrgeddes <>2016-05-11 13:48:23 -0500
committerWilliam G. Hoffa <>2016-05-18 12:40:15 -0400
commitf0dab5c70d0ebae48b43415904ca53a7ceea1ba0 (patch)
tree907f4cd1748a6653be86b362dd29da979f1018e8 /src/build/tools
parentfaba45366783533757b3636b0dcf0db2a1b2497e (diff)
Remove the copyright_check that was adding submitter to prolog contributor
The addCopyright script was failing in hostboot-ci because when it was ran on standalone it would add the current submitter of the commit as a contributor and when it ran on ci it would add the author of the commit as a contributor. In the past these two have been the same, however if we were to merge a pull request from a third-party who was not and IBMer we would fail CI. Now it will only check the author if the copyright_check flag is set. Change-Id: I7a360a824d73a89872040932d2e7e3f8a334e770 RTC:117874 Reviewed-on: Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Reviewed-by: Stephen M. Cprek <> Reviewed-by: Elizabeth K. Liner <> Tested-by: Jenkins OP HW Reviewed-by: William G. Hoffa <> Reviewed-on: Reviewed-by: Christian R. Geddes <>
Diffstat (limited to 'src/build/tools')
1 files changed, 11 insertions, 13 deletions
diff --git a/src/build/tools/ b/src/build/tools/
index 3a922b3e0..000958c1e 100755
--- a/src/build/tools/
+++ b/src/build/tools/
@@ -1161,23 +1161,21 @@ sub getFileContributors
my $gitAuthors = `git log --follow --find-copies-harder -C85% -M85% --pretty="%aN <%aE>" -- $filename | sort | uniq`;
my @gitAuthors = split('\n', $gitAuthors);
- # Add current commiter.
+ # Get commit's author
# If running copyright_check run 'git log' as a commit is not taking place
- # Otherwise check using 'git config' as this is a pre-commit hook
- my $curAuthorEmail = "";
- if ($copyright_check)
- {
- $curAuthorEmail = `git log -n1 --pretty=format:"%aN <%aE>"`;
- chomp($curAuthorEmail);
- }
- else
+ # Else we currently have no way of getting the current author. Because
+ # this is a pre-commit hook, the commit staged to be committed does not
+ # show up in 'git log' until commit has completed. We cannot look up
+ # current user's info because the user pushing the commit may not be
+ # the author.
+ if($copyright_check)
- my $curAuthorName = `git config`;
- $curAuthorEmail = `git config`;
+ my $curAuthorEmail = `git log -n1 --pretty=format:"%aN <%aE>"`;
- $curAuthorEmail = "$curAuthorName <".$curAuthorEmail.">";
+ push(@gitAuthors, $curAuthorEmail);
- push(@gitAuthors, $curAuthorEmail);
foreach my $contributor (@gitAuthors)
my $companyExists = 0;
OpenPOWER on IntegriCloud