[diffoscope] 02/02: Add --max-container-depth CLI option

Ximin Luo infinity0 at debian.org
Mon May 22 20:08:05 CEST 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch experimental
in repository diffoscope.

commit d43de9bcabccdd6d6ca4ea00e4c2182d02451b32
Author: Ximin Luo <infinity0 at debian.org>
Date:   Mon May 22 20:07:18 2017 +0200

    Add --max-container-depth CLI option
    
    Also useful for doing "shallow" diffs of very large projects like GCC
---
 diffoscope/main.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/diffoscope/main.py b/diffoscope/main.py
index 9d7f947..60f8771 100644
--- a/diffoscope/main.py
+++ b/diffoscope/main.py
@@ -168,6 +168,11 @@ def create_parser():
                         Config().max_diff_input_lines,
                         default=None).completer=RangeCompleter(0,
                         Config().max_diff_input_lines, 5000)
+    group3.add_argument('--max-container-depth', metavar='DEPTH', type=int,
+                        help='Maximum depth to recurse into containers. '
+                        '(Cannot be disabled for security reasons, default: '
+                        '%(default)s)',
+                        default=Config().max_container_depth)
 
     group4 = parser.add_argument_group('information commands')
     group4.add_argument('--help', '-h', action='help',
@@ -276,6 +281,7 @@ def run_diffoscope(parsed_args):
     maybe_set_limit(Config(), parsed_args, "max_diff_block_lines_parent")
     maybe_set_limit(Config(), parsed_args, "max_diff_block_lines")
     maybe_set_limit(Config(), parsed_args, "max_diff_input_lines")
+    Config().max_container_depth = parsed_args.max_container_depth
     Config().fuzzy_threshold = parsed_args.fuzzy_threshold
     Config().new_file = parsed_args.new_file
     Config().excludes = parsed_args.excludes

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list