From 2558895ab5657f2b1040a675604a41fce82e8b56 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karl=20Hasselstr=C3=B6m?= Date: Tue, 29 Jan 2008 00:11:59 +0100 Subject: [PATCH] Teach new infrastructure to diff two trees MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Nothing uses this yet, but "stg edit" will soon. Signed-off-by: Karl Hasselström --- stgit/lib/git.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stgit/lib/git.py b/stgit/lib/git.py index 45879df..d75f724 100644 --- a/stgit/lib/git.py +++ b/stgit/lib/git.py @@ -356,6 +356,11 @@ class Repository(RunWithEnv): return None finally: index.delete() + def diff_tree(self, t1, t2, diff_opts): + assert isinstance(t1, Tree) + assert isinstance(t2, Tree) + return self.run(['git', 'diff-tree', '-p'] + list(diff_opts) + + [t1.sha1, t2.sha1]).raw_output() class MergeException(exception.StgException): pass -- 2.11.0