grim/local-pipelines
Clone
Summary
Browse
Changes
Graph
vcs: add new class that interfaces to git repos
2016-07-27, Sean Farley
5ebfb03a8864
Parents
9c5ce23ceaec
Children
601bff56b3fb
vcs: add new class that interfaces to git repos
1 files changed, 10 insertions(+), 0 deletions(-)
+10
-0
pipelines/vcs.py
--- 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()