Add --protocol-override to fetch.py
This CL adds a non-functional `--protocol` flag to fetch.py. This will be used in the follow-up CL to update fetching protocol.
Bug: 1322156
Change-Id: I7eeebb9993face20bb671d6942ee23fd04802d8b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3609453
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
diff --git a/fetch.py b/fetch.py
index 45e34a1..916d64f 100755
--- a/fetch.py
+++ b/fetch.py
@@ -34,6 +34,7 @@
SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__))
+DEFAULT_PROTOCOL = 'https'
#################################################
# Checkout class definitions.
@@ -199,6 +200,12 @@
help='Perform shallow clones, don\'t fetch the full git history.')
parser.add_argument('--force', action='store_true', default=False,
help='(dangerous) Don\'t look for existing .gclient file.')
+ parser.add_argument(
+ '-p',
+ '--protocol-override',
+ type=str,
+ default=DEFAULT_PROTOCOL,
+ help='Protocol to use to fetch dependencies, defaults to https.')
parser.add_argument('config', type=str,
help="Project to fetch, e.g. chromium.")