summaryrefslogtreecommitdiff
path: root/gbp/git/repository.py
diff options
context:
space:
mode:
Diffstat (limited to 'gbp/git/repository.py')
-rw-r--r--gbp/git/repository.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index 61c825d..5d7e38c 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -1449,7 +1449,7 @@ class GitRepository(object):
args.append(patch)
self._git_command("apply", args)
- def diff(self, obj1, obj2, paths=None):
+ def diff(self, obj1, obj2=None, paths=None):
"""
Diff two git repository objects
@@ -1462,7 +1462,9 @@ class GitRepository(object):
@return: diff
@rtype: C{str}
"""
- options = GitArgs(obj1, obj2)
+ options = GitArgs()
+ options.add(obj1)
+ options.add_true(obj2, obj2)
if paths:
options.add('--', paths)
output, stderr, ret = self._git_inout('diff', options.args)