grim/local-pipelines

5ebfb03a8864
Parents 9c5ce23ceaec
Children 601bff56b3fb
vcs: add new class that interfaces to git repos
--- a/pipelines/vcs.py Wed Jul 27 22:15:09 2016 -0700
+++ b/pipelines/vcs.py Wed Jul 27 22:15:36 2016 -0700
@@ -45,6 +45,16 @@
return ''
+class git_backend(object):
+ def __init__(self, path):
+ self._path = path
+
+ @property
+ def branch(self):
+ return run_command('git rev-parse --abbrev-ref HEAD',
+ self._path)
+
+
def get_branch(path):
branch = None
env = os.environ.copy()