git-repo/subcmds
Mike Frysinger ae6cb08ae5 split out cli validation from execution
A common pattern in our subcommands is to verify the arguments &
options before executing things.  For some subcommands, that check
stage is quite long which makes the execution function even bigger.
Lets split that logic out of the execute phase so it's easier to
manage these.

This is most noticeable in the sync subcommand whose Execute func
is quite large, and the option checking makes up ~15% of it.

The manifest command's Execute can be simplified significantly as
the optparse configuration always sets output_file to a string.

Change-Id: I7097847ff040e831345e63de6b467ee17609990e
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/234834
Reviewed-by: David Pursehouse <dpursehouse@collab.net>
Tested-by: Mike Frysinger <vapier@google.com>
2019-08-28 03:54:11 +00:00
..
__init__.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
abandon.py split out cli validation from execution 2019-08-28 03:54:11 +00:00
branches.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
checkout.py split out cli validation from execution 2019-08-28 03:54:11 +00:00
cherry_pick.py split out cli validation from execution 2019-08-28 03:54:11 +00:00
diff.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
diffmanifests.py split out cli validation from execution 2019-08-28 03:54:11 +00:00
download.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
forall.py split out cli validation from execution 2019-08-28 03:54:11 +00:00
gitc_delete.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
gitc_init.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
grep.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
help.py help: add a --help-all option to show all commands at once 2019-08-27 07:07:24 +00:00
info.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
init.py split out cli validation from execution 2019-08-28 03:54:11 +00:00
list.py split out cli validation from execution 2019-08-28 03:54:11 +00:00
manifest.py split out cli validation from execution 2019-08-28 03:54:11 +00:00
overview.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
prune.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
rebase.py rebase: pull out project-independent settings from the for loop 2019-08-08 17:41:40 +00:00
selfupdate.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
smartsync.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
stage.py set default file encoding to utf-8 2019-06-13 14:30:52 +00:00
start.py split out cli validation from execution 2019-08-28 03:54:11 +00:00
status.py status: import print_function 2019-06-14 14:13:23 +00:00
sync.py split out cli validation from execution 2019-08-28 03:54:11 +00:00
upload.py use print() instead of sys.stdout.write() 2019-07-11 06:26:40 +00:00
version.py git_command: drop custom version helper 2019-07-11 01:30:18 +00:00