Add a --dry-run option to git cl split

git cl split previously had no way to find out what it would do before
it went ahead and uploaded CLs. Now you can use --dry-run to get it
to print info about each CL it would upload.

Change-Id: If2ac74a89b0a8b30d86819e16ece46f487b1e7c7
Reviewed-on: https://chromium-review.googlesource.com/821336
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Chris Watkins <watk@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index 92cac9b..2b08e33 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -5056,6 +5056,10 @@
                          "$directory will be replaced by each CL's directory.")
   parser.add_option("-c", "--comment", dest="comment_file",
                     help="A text file containing a CL comment.")
+  parser.add_option("-n", "--dry-run", dest="dry_run", action='store_true',
+                    default=False,
+                    help="List the files and reviewers for each CL that would "
+                         "be created, but don't create branches or CLs.")
   options, _ = parser.parse_args(args)
 
   if not options.description_file:
@@ -5065,7 +5069,7 @@
     return CMDupload(OptionParser(), args)
 
   return split_cl.SplitCl(options.description_file, options.comment_file,
-                          Changelist, WrappedCMDupload)
+                          Changelist, WrappedCMDupload, options.dry_run)
 
 
 @subcommand.usage('DEPRECATED')