aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp/git/vfs.py
diff options
context:
space:
mode:
Diffstat (limited to 'gbp/git/vfs.py')
-rw-r--r--gbp/git/vfs.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/gbp/git/vfs.py b/gbp/git/vfs.py
index 191cf621..4ca29625 100644
--- a/gbp/git/vfs.py
+++ b/gbp/git/vfs.py
@@ -44,6 +44,12 @@ class GitVfs(object):
def close(self):
return self._data.close()
+ def __enter__(self):
+ return self
+
+ def __exit__(self, exc_type, exc_val, exc_tb):
+ self.close()
+
def __init__(self, repo, committish=None):
"""
@param repo: the git repository to act on