aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp/git
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-07-19 11:43:01 +0300
committerGuido Günther <agx@sigxcpu.org>2013-09-10 09:15:47 +0200
commit39f581ee6e2a5f37f07fd61f2288d5686959d0c4 (patch)
tree0428bffce513b9e1c05e795ec9528aa004af5dd7 /gbp/git
parente54289ef2a5f72456834de3a21c2e6c3f2ebdb6b (diff)
GitRepository.diff: add 'ignore_submodules' option
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'gbp/git')
-rw-r--r--gbp/git/repository.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index e2f243ba..6935260e 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: