From 3a0c001416cb3242996fff289e7da95e64079916 Mon Sep 17 00:00:00 2001 From: Tommy Ip Date: Sun, 5 Mar 2017 16:21:32 +0000 Subject: [PATCH] Add support for linting a range of commits natively This allows user to specify a range of commits using the --commits cli option. It currently accepts either an individual commit hash (eg: gitlint --commits 6f29bf8) or a range of commits using the git range syntax (eg: gitlint --commits 9c6f70d...HEAD). Fixes #14. --- gitlint/cli.py | 24 +++++++--- gitlint/git.py | 92 ++++++++++++++++++++------------------- gitlint/tests/test_cli.py | 12 +++-- gitlint/tests/test_git.py | 76 +++++++++++++++----------------- 4 files changed, 105 insertions(+), 99 deletions(-) diff --git a/gitlint/cli.py b/gitlint/cli.py index 81992b07..00927116 100644 --- a/gitlint/cli.py +++ b/gitlint/cli.py @@ -70,6 +70,7 @@ def build_config(ctx, target, config_path, c, extra_path, ignore, verbose, silen @click.option('-c', multiple=True, help="Config flags in format .