diff options
author | Ross Burton <ross.burton@arm.com> | 2023-10-30 11:48:38 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-30 11:53:16 +0000 |
commit | 3c04747b681cf6090ba9c77752f6c2f304dbbe17 (patch) | |
tree | 2f4818c4859978a01b2f562310791942060e84b4 /scripts | |
parent | 0cc2c0a9ec16fceeb19e01cd47af8c0743168030 (diff) | |
download | openembedded-core-contrib-3c04747b681cf6090ba9c77752f6c2f304dbbe17.tar.gz |
scripts/contrib/patchreview: fix commit identification
git show-ref looks at the _remote_ ref called HEAD, which is fine when it
matches the local HEAD but problematic when you're iterating a series of
commits.
Use rev-parse to resolve the local name to a proper hash.
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/contrib/patchreview.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/contrib/patchreview.py b/scripts/contrib/patchreview.py index f95cadab0c..bceae06561 100755 --- a/scripts/contrib/patchreview.py +++ b/scripts/contrib/patchreview.py @@ -257,7 +257,7 @@ if __name__ == "__main__": row = collections.Counter() row["total"] = len(results) row["date"] = subprocess.check_output(["git", "-C", args.directory, "show", "-s", "--pretty=format:%cd", "--date=format:%s"], universal_newlines=True).strip() - row["commit"] = subprocess.check_output(["git", "-C", args.directory, "show-ref", "--hash", "HEAD"], universal_newlines=True).strip() + row["commit"] = subprocess.check_output(["git", "-C", args.directory, "rev-parse", "HEAD"], universal_newlines=True).strip() row['commit_count'] = subprocess.check_output(["git", "-C", args.directory, "rev-list", "--count", "HEAD"], universal_newlines=True).strip() row['recipe_count'] = count_recipes(layers) |