summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2023-10-30 11:48:38 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-10-30 11:53:20 +0000
commit28324600cb143775abe56af024ee10930236727d (patch)
treea64311feeb3aec094c1a3e290baed652a3319e51
parent415ff3a78c93138603910fc8ac7e11dc91587965 (diff)
downloadpoky-28324600cb143775abe56af024ee10930236727d.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. (From OE-Core rev: 3c04747b681cf6090ba9c77752f6c2f304dbbe17) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/contrib/patchreview.py2
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__":
257 row = collections.Counter() 257 row = collections.Counter()
258 row["total"] = len(results) 258 row["total"] = len(results)
259 row["date"] = subprocess.check_output(["git", "-C", args.directory, "show", "-s", "--pretty=format:%cd", "--date=format:%s"], universal_newlines=True).strip() 259 row["date"] = subprocess.check_output(["git", "-C", args.directory, "show", "-s", "--pretty=format:%cd", "--date=format:%s"], universal_newlines=True).strip()
260 row["commit"] = subprocess.check_output(["git", "-C", args.directory, "show-ref", "--hash", "HEAD"], universal_newlines=True).strip() 260 row["commit"] = subprocess.check_output(["git", "-C", args.directory, "rev-parse", "HEAD"], universal_newlines=True).strip()
261 row['commit_count'] = subprocess.check_output(["git", "-C", args.directory, "rev-list", "--count", "HEAD"], universal_newlines=True).strip() 261 row['commit_count'] = subprocess.check_output(["git", "-C", args.directory, "rev-list", "--count", "HEAD"], universal_newlines=True).strip()
262 row['recipe_count'] = count_recipes(layers) 262 row['recipe_count'] = count_recipes(layers)
263 263