diff options
author | Leif Lindholm <leif.lindholm@oss.qualcomm.com> | 2025-06-10 12:56:14 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2025-06-25 16:22:25 +0000 |
commit | a2e20bc4b0dc4f88105d304dd99479fd4f1eaac0 (patch) | |
tree | f365d62e3647b3ab207401e7e32cc9cf132918be | |
parent | fe19f86dcd9c5c40b5ed487ee7eacd93a013a044 (diff) | |
download | edk2-a2e20bc4b0dc4f88105d304dd99479fd4f1eaac0.zip edk2-a2e20bc4b0dc4f88105d304dd99479fd4f1eaac0.tar.gz edk2-a2e20bc4b0dc4f88105d304dd99479fd4f1eaac0.tar.bz2 |
BaseTools/PatchCheck.py: make get_parent_packages return directory names
The get_parent_packages function in CheckGitCommits returns the path of
non-package directories, but in fact returns the path of the .dec file
for actual packages.
Align the handling to be more consistent and return only directory names,
regarding of how it was found.
Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
-rwxr-xr-x | BaseTools/Scripts/PatchCheck.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Scripts/PatchCheck.py b/BaseTools/Scripts/PatchCheck.py index d178a60..551e0b4 100755 --- a/BaseTools/Scripts/PatchCheck.py +++ b/BaseTools/Scripts/PatchCheck.py @@ -730,7 +730,7 @@ class CheckGitCommits: for dec_file in dec_files:
if os.path.commonpath([dec_file, file]):
dec_found = True
- parents.add(dec_file)
+ parents.add(dec_file.split('/')[0])
if not dec_found and os.path.dirname (file):
# No DEC file found and file is in a subdir
# Covers BaseTools, .github, .azurepipelines, .pytool
|