summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorNicolas Dechesne <nicolas.dechesne@oss.qualcomm.com>2024-11-19 10:41:09 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-11-21 12:16:28 +0000
commit79ef781499f5bf219dae338882eefe7d4f800304 (patch)
treeb6c737c3f800b6b4602c904fd42d677332d97c4d /scripts
parent392658c663acb302ff577cd512309c354259d1b4 (diff)
downloadpoky-79ef781499f5bf219dae338882eefe7d4f800304.tar.gz
scripts: patchreview: fix failure when running from a different folder
When running patchreview with --blame, the scripts runs a git log command on the analyzed patch. When trying to analyse a layer which is not in poky tree, we might be running the git log command from outside the git workspace where the file is located, which results in such failures: Missing Signed-off-by tag ([truncated]/meta-qcom-hwe/recipes-devtools/partition-utils/qcom-ptool/0001-ptool.py-Generate-zero-files-in-output-folder-when-s.patch) fatal: not a git repository (or any parent up to mount point /local/mnt) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). Fix this situation by setting the current work dir inside the git workspace of the patch when running git log. (From OE-Core rev: 8cc1c900b91d60e633f62bfe16a2ffc2d61c3f55) Signed-off-by: Nicolas Dechesne <nicolas.dechesne@oss.qualcomm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-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 69ef14eb44..d8d7b214e5 100755
--- a/scripts/contrib/patchreview.py
+++ b/scripts/contrib/patchreview.py
@@ -51,7 +51,7 @@ def blame_patch(patch):
51 return subprocess.check_output(("git", "log", 51 return subprocess.check_output(("git", "log",
52 "--follow", "--find-renames", "--diff-filter=A", 52 "--follow", "--find-renames", "--diff-filter=A",
53 "--format=%s (%aN <%aE>)", 53 "--format=%s (%aN <%aE>)",
54 "--", patch)).decode("utf-8").splitlines() 54 "--", patch), cwd=os.path.dirname(patch)).decode("utf-8").splitlines()
55 55
56def patchreview(patches): 56def patchreview(patches):
57 57