[scripts/util] add 'git' helper

This commit is contained in:
Mike Fährmann
2025-08-17 08:59:56 +02:00
parent 257b87a239
commit d8e466da15
2 changed files with 9 additions and 1 deletions

View File

@@ -27,6 +27,14 @@ def open(path, mode="r"):
return builtins.open(path, mode, encoding="utf-8", newline="\n")
def git(command, *args):
import subprocess
return subprocess.Popen(
["git", command, *args],
stdout=subprocess.PIPE,
).communicate()[0].strip().decode()
class lazy():
def __init__(self, path):