Improve git cl split
This CL changes the behavior of `git cl split` to split the change
by the size of the resulting CLs. For now, this is based on the number
of bytes changed, and not by the number of changed lines. Depending
on the shape of change, this may still produce more CLs than expected
(and possibly more than before).
A future change will switch the split to be based on the number
of affected lines, and also introduce a mode to base the split
on the number of affected files.
Bug: 998922
Change-Id: I49f868972a61b89b426ef9e2ceedc733eacb4350
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1778744
Commit-Queue: Yannic Bonenberger <yannic.bonenberger@gmail.com>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index a04a6a9..e0c8257 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -4530,8 +4530,10 @@
Creates a branch and uploads a CL for each group of files modified in the
current branch that share a common OWNERS file. In the CL description and
- comment, the string '$directory', is replaced with the directory containing
- the shared OWNERS file.
+ comment, '$directory' is replaced with the directory containing the changes
+ in this CL, '$cl_index' is replaced with the index of the CL we're currently
+ sending out, and '$num_cls' is replaced with the total number of CLs that
+ we're sending out in this split.
"""
parser.add_option('-d', '--description', dest='description_file',
help='A text file containing a CL description in which '