summaryrefslogtreecommitdiffstats
path: root/meta/classes-global
diff options
context:
space:
mode:
authorJermain Horsman <jermain.horsman@nedap.com>2023-10-03 16:56:36 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-10-06 11:51:11 +0100
commit02b8c36efe26e7670288eacaa8b6bc1a91aa2d2d (patch)
tree7a68455958867003fdee2b0ef80223a8cac9d5b6 /meta/classes-global
parent23f4bb7710f031ff5eafdbb0c50c11a1705f9eb2 (diff)
downloadpoky-02b8c36efe26e7670288eacaa8b6bc1a91aa2d2d.tar.gz
scripts/oe-setup-layers: Update how to determine if directory is git repo
Previously _is_repo_git_repo() would return a result containing b'true\n' or b'false\n' if 'git rev-parse' ran successfully, instead of True of False. While this can be solved using e.g. result.strip().decode("utf-8") == "true", there are some other cases to consider. First, .git can be a file and not a directory when using a worktree. Second, an emtpy .git directory in 'repodir' for which some parent of 'repodir' is an actual git repo will still return True in this case. To account for these cases as well, use 'git rev-parse --show-toplevel' and compare the result against 'repodir' instead of using 'git rev-parse --is-inside-git-dir'. (From OE-Core rev: 0830f53900dd7fd669a7d6492325559ad3225302) Signed-off-by: Jermain Horsman <jermain.horsman@nedap.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-global')
0 files changed, 0 insertions, 0 deletions