mirror of
https://git.yoctoproject.org/poky
synced 2026-04-23 00:32:12 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
392658c663
commit
79ef781499
@@ -51,7 +51,7 @@ def blame_patch(patch):
|
||||
return subprocess.check_output(("git", "log",
|
||||
"--follow", "--find-renames", "--diff-filter=A",
|
||||
"--format=%s (%aN <%aE>)",
|
||||
"--", patch)).decode("utf-8").splitlines()
|
||||
"--", patch), cwd=os.path.dirname(patch)).decode("utf-8").splitlines()
|
||||
|
||||
def patchreview(patches):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user