INNER CODE UNIT · Python

Uncertain

spantaleev/matrix-docker-ansible-deploy · bin/molecule-select-roles.py:37

class Uncertain(Exception):
    """The change cannot safely be narrowed to particular scenarios."""


class Git:
    def __init__(self, root):
        self.root = root

    def run(self, *args, input=None):
        return subprocess.run(
            ["git", *args], cwd=self.root, input=input, stdout=subprocess.PIPE,
            stderr=subprocess.PIPE, check=True,
        ).stdout

    def commit(self, ref):
        return self.run("rev-parse", "--verify", "--end-of-options", f"{ref}^{{commit}}").decode().strip()

    def snapshot(self, ref):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…