From 39f581ee6e2a5f37f07fd61f2288d5686959d0c4 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Fri, 19 Jul 2013 11:43:01 +0300 Subject: GitRepository.diff: add 'ignore_submodules' option Signed-off-by: Markus Lehtonen --- gbp/git/repository.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gbp/git') diff --git a/gbp/git/repository.py b/gbp/git/repository.py index e2f243b..6935260 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -1519,7 +1519,7 @@ class GitRepository(object): self._git_command("apply", args) def diff(self, obj1, obj2=None, paths=None, stat=False, summary=False, - text=False): + text=False, ignore_submodules=True): """ Diff two git repository objects @@ -1535,6 +1535,8 @@ class GitRepository(object): @type summary: C{bool} @param text: Generate textual diffs, treat all files as text @type text: C{bool} + @param ignore_submodules: ignore changes to submodules + @type ignore_submodules: C{bool} @return: diff @rtype: C{str} """ @@ -1545,6 +1547,7 @@ class GitRepository(object): options.add('--stat=%s' % stat) options.add_true(summary, '--summary') options.add_true(text, '--text') + options.add_true(ignore_submodules, '--ignore-submodules=all') options.add(obj1) options.add_true(obj2, obj2) if paths: -- cgit v1.2.3