diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2013-11-11 17:59:36 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2013-11-22 13:49:26 +0000 |
commit | a070b772a565a2803bb1ac4c63a1784cb249ecc3 (patch) | |
tree | 0d30ae7b088573d4b95e5a96ba30f5a7233c2b92 /morphlib/gitindex.py | |
parent | 02f112af84b32b6731b6d286d3002730bfb2eabc (diff) | |
download | morph-a070b772a565a2803bb1ac4c63a1784cb249ecc3.tar.gz |
gitindex: Add GitIndex.write_tree()
This generates a tree object from the index.
This can then be used to create a commit.
Diffstat (limited to 'morphlib/gitindex.py')
-rw-r--r-- | morphlib/gitindex.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/morphlib/gitindex.py b/morphlib/gitindex.py index a119389e..978ea0e2 100644 --- a/morphlib/gitindex.py +++ b/morphlib/gitindex.py @@ -153,3 +153,7 @@ class GitIndex(object): # 50 is an arbitrary limit for paths in morphlib.util.iter_trickle(paths, 50): self._run_git('add', *paths) + + def write_tree(self): + '''Transform the index into a tree in the object store.''' + return self._run_git('write-tree').strip() |