summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-11-02 13:00:39 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-11-02 13:00:39 -0400
commitea5110cf629a4547070ff747bafe3cfae5233cd1 (patch)
tree1844c1cae019e507e7903914893addff3521600e /src/lib
parenteaaa933b1215f409038adaf01800fefd405d07a2 (diff)
downloadbcfg2-ea5110cf629a4547070ff747bafe3cfae5233cd1.tar.gz
bcfg2-ea5110cf629a4547070ff747bafe3cfae5233cd1.tar.bz2
bcfg2-ea5110cf629a4547070ff747bafe3cfae5233cd1.zip
fixed git plugin interface to git commands
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Git.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Git.py b/src/lib/Bcfg2/Server/Plugins/Git.py
index b7269af48..5faa6c018 100644
--- a/src/lib/Bcfg2/Server/Plugins/Git.py
+++ b/src/lib/Bcfg2/Server/Plugins/Git.py
@@ -92,7 +92,8 @@ except ImportError:
""" API for :class:`Git` using subprocess to run git
commands """
def revision(self):
- proc = Popen(["git", "--work-tree", self.path,
+ proc = Popen(["git", "--work-tree",
+ os.path.join(self.path, ".git"),
"rev-parse", "HEAD"], stdout=PIPE,
stderr=PIPE)
rv, err = proc.communicate()
@@ -102,7 +103,8 @@ except ImportError:
return rv.strip() # pylint: disable=E1103
def pull(self):
- proc = Popen(["git", "--work-tree", self.path,
+ proc = Popen(["git", "--work-tree",
+ os.path.join(self.path, ".git"),
"pull", "--rebase"], stdout=PIPE,
stderr=PIPE)
err = proc.communicate()[1].strip()