diff --git a/gerritlab/main.py b/gerritlab/main.py index d9a3943..e3e1683 100644 --- a/gerritlab/main.py +++ b/gerritlab/main.py @@ -1,3 +1,4 @@ +import logging import shutil import time import os @@ -313,6 +314,12 @@ def main(): nargs="?", help="The final branch that commits are intended to be merged into.", ) + parser.add_argument( + "--debug", + action="store_true", + default=False, + help="Show debugging information (subprocesses, HTTP requests, etc).", + ) parser.add_argument( "--merge", "-m", @@ -336,6 +343,9 @@ def main(): ) args = parser.parse_args() + if args.debug: + logging.basicConfig(level=logging.DEBUG) + repo = Repo(os.getcwd(), search_parent_directories=True) ensure_commitmsg_hook(repo.git_dir)