summaryrefslogtreecommitdiff
path: root/morphlib/gitdir.py
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2015-05-05 17:58:24 +0000
committerBaserock Gerrit <gerrit@baserock.org>2015-05-07 14:10:28 +0000
commit42b915c2961c6fc72e08073cb98f9cbf7cb9c08a (patch)
treefa17e7dccca02f54379df60ff337f00adf1d23d3 /morphlib/gitdir.py
parent6db8c4f9f6547f18c6e4dccca9f296cb9eb3e9d5 (diff)
downloadmorph-42b915c2961c6fc72e08073cb98f9cbf7cb9c08a.tar.gz
Make str() of a GitDirectory return its location.
Handy for log messages. Change-Id: I4336866c456a6225a6f3ecbfef10dfc7b864ac59
Diffstat (limited to 'morphlib/gitdir.py')
-rw-r--r--morphlib/gitdir.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/morphlib/gitdir.py b/morphlib/gitdir.py
index b80096c3..688e4b34 100644
--- a/morphlib/gitdir.py
+++ b/morphlib/gitdir.py
@@ -388,6 +388,9 @@ class GitDirectory(object):
self._ensure_is_git_repo()
+ def __str__(self):
+ return self.dirname
+
def _runcmd(self, argv, **kwargs):
'''Run a command at the root of the git directory.