diff options
author | Victor Boivie <victor.boivie@sonyericsson.com> | 2011-04-05 11:31:10 +0200 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2011-11-29 14:31:56 -0800 |
commit | 841be34968c91c3ea8d8694bc5910e6388f58cbb (patch) | |
tree | cd2b3db593611ecad858e841edae17183458f680 /repo | |
parent | ee1c2f5717fcc137ab887a4aae8a08d50a539b9a (diff) | |
download | git-repo-841be34968c91c3ea8d8694bc5910e6388f58cbb.tar.gz |
Don't prompt the user for name/email unless necessary
If the user has already configured a workspace, use these values
when re-running 'repo init'.
Otherwise, if the user has global name and e-mail set, use these.
It's always possible to override this and be prompted by specifying
--config-name when running 'repo init'.
Change-Id: If45f0e4b14884071439fb02709dc5cb53f070f60
Diffstat (limited to 'repo')
-rwxr-xr-x | repo | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -139,6 +139,11 @@ group.add_option('--no-repo-verify', | |||
139 | dest='no_repo_verify', action='store_true', | 139 | dest='no_repo_verify', action='store_true', |
140 | help='do not verify repo source code') | 140 | help='do not verify repo source code') |
141 | 141 | ||
142 | # Other | ||
143 | group = init_optparse.add_option_group('Other options') | ||
144 | group.add_option('--config-name', | ||
145 | dest='config_name', action="store_true", default=False, | ||
146 | help='Always prompt for name/e-mail') | ||
142 | 147 | ||
143 | class CloneFailure(Exception): | 148 | class CloneFailure(Exception): |
144 | """Indicate the remote clone of repo itself failed. | 149 | """Indicate the remote clone of repo itself failed. |