summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2013-11-12 15:59:58 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2013-11-22 13:49:25 +0000
commit84c233d1de3993028663a287caf56a9b370fed97 (patch)
tree8f4f4862e7c3ece384fd86eda2c50c9209457ce5
parentf00ff26658cee440f43e53f8e7c76850ba6229a4 (diff)
downloadmorph-84c233d1de3993028663a287caf56a9b370fed97.tar.gz
GitDir: Allow config values ending in whitespace
-rw-r--r--morphlib/gitdir.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/morphlib/gitdir.py b/morphlib/gitdir.py
index a3e5b6fa..5a622539 100644
--- a/morphlib/gitdir.py
+++ b/morphlib/gitdir.py
@@ -118,8 +118,8 @@ class GitDirectory(object):
def get_config(self, key):
'''Return value for a git repository configuration variable.'''
- value = self._runcmd(['git', 'config', key])
- return value.strip()
+ value = self._runcmd(['git', 'config', '-z', key])
+ return value.rstrip('\0')
def set_remote_fetch_url(self, remote_name, url):
'''Set the fetch URL for a remote.'''