mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-13 03:19:47 +03:00
WIP: 2024-06-05: args hacking and more (MR 2252)
Continue removing args and do some other optimisations. Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
5bb2390d98
commit
de4c912692
52 changed files with 498 additions and 464 deletions
|
@ -248,8 +248,11 @@ def get_topdir(repo: Path):
|
|||
:returns: a string with the top dir of the git repository,
|
||||
or an empty string if it's not a git repository.
|
||||
"""
|
||||
return pmb.helpers.run.user(["git", "rev-parse", "--show-toplevel"],
|
||||
repo, output_return=True, check=False).rstrip()
|
||||
res = pmb.helpers.run.user(["git", "rev-parse", "--show-toplevel"],
|
||||
repo, output_return=True, check=False)
|
||||
if not isinstance(res, str):
|
||||
raise RuntimeError("Not a git repository: " + str(repo))
|
||||
return res.strip()
|
||||
|
||||
|
||||
def get_files(repo: Path):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue