Introduce --send-email flag as an alias to --send-mail for `git cl upload`
Vanilla git has a git-send-email(1) subcommand. `git cl upload` should
follow suit by using the same flag name to be consistent and avoid
confusion.
[1]: https://git-scm.com/docs/git-send-email
Bug: none
Change-Id: I47ff8e03bd11915e99804fe1695046d874efc4e0
Tested: `git cl upload --send-email` to upload this very own CL
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3854330
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
Auto-Submit: Thiago Perrotta <tperrotta@chromium.org>
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index 0c72c27..22f2716 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -1315,6 +1315,18 @@
final_description=(
'desc ✔\n\nBUG=\nR=foo@example.com\n\nChange-Id: I123456789'))
+ def test_gerrit_reviewers_cmd_line_send_email(self):
+ self._run_gerrit_upload_test(
+ ['-r', 'foo@example.com', '--send-email'],
+ 'desc ✔\n\nBUG=\n\nChange-Id: I123456789',
+ reviewers=['foo@example.com'],
+ squash=False,
+ squash_mode='override_nosquash',
+ notify=True,
+ change_id='I123456789',
+ final_description=(
+ 'desc ✔\n\nBUG=\nR=foo@example.com\n\nChange-Id: I123456789'))
+
def test_gerrit_upload_force_sets_bug(self):
self._run_gerrit_upload_test(
['-b', '10000', '-f'],