summaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2012-11-16 09:33:39 +0900
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2012-11-17 12:40:42 +0900
commitb148ac9d9aefb18baddbf9e28ed33b1b8c6e96e6 (patch)
tree64564abdc213acb66c83f6782566caf51e194678 /main.py
parenta67df63ef18f7bcd1398dc5c3622c01c3fcad15d (diff)
downloadgit-repo-b148ac9d9aefb18baddbf9e28ed33b1b8c6e96e6.tar.gz
Allow command options to be set from environment variables
Extend the Command base class to allow options to be set from values in environment variables, if the user has not given the option on the command line and the environment variable is set. Derived classes of Command can override the implementation of the method _GetEnvironmentOptions to configure which of its options may be set from environment variables. Change-Id: I7c780bcf9644d6567893d9930984c054bce7351e
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/main.py b/main.py
index 83967f77..9cc2639a 100755
--- a/main.py
+++ b/main.py
@@ -120,6 +120,7 @@ class _Repo(object):
120 return 1 120 return 1
121 121
122 copts, cargs = cmd.OptionParser.parse_args(argv) 122 copts, cargs = cmd.OptionParser.parse_args(argv)
123 copts = cmd.ReadEnvironmentOptions(copts)
123 124
124 if not gopts.no_pager and not isinstance(cmd, InteractiveCommand): 125 if not gopts.no_pager and not isinstance(cmd, InteractiveCommand):
125 config = cmd.manifest.globalConfig 126 config = cmd.manifest.globalConfig