HomePhabricator

Scripts and tools: Fix devtools/copyright_header.py to always honor exclusions

Description

Scripts and tools: Fix devtools/copyright_header.py to always honor exclusions

Summary:
This script compared paths relative to the report directory to test for exclusion,
meaning the directory exclusions did not work properly, as they were relative to
the project root.

Fix this by creating absolute paths through the combination of:
'git ls-files --full-name'and 'git rev-parse --show-toplevel'

This is a backport of core#15258 [1/2]
https://github.com/bitcoin/bitcoin/pull/15258/commits/2434ab5c2afd61aa0cf81f80b1b236ea52d1d20d

Test Plan: ./contrib/devtools/copyright_header.py report .

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D9810

Details

Provenance
Ben Woosley <ben.woosley@gmail.com>Authored on Jan 25 2019, 06:49
PiRKCommitted on Jul 20 2021, 09:39
PiRKPushed on Jul 20 2021, 09:39
Reviewer
Restricted Project
Differential Revision
D9810: Scripts and tools: Fix devtools/copyright_header.py to always honor exclusions
Parents
rABC84140bbf25f8: Rename the test unspendable address
Branches
Unknown
Tags
Unknown