Index: git_cl.py |
diff --git a/git_cl.py b/git_cl.py |
index 415e36259b0a41aa04d0cc9d34ad1d402c257c23..7913e989d0345483b70b65e303a711adcf5365fd 100755 |
--- a/git_cl.py |
+++ b/git_cl.py |
@@ -3725,6 +3725,8 @@ def CMDupload(parser, args): |
parser.add_option('-f', action='store_true', dest='force', |
help="force yes to questions (don't prompt)") |
parser.add_option('-m', dest='message', help='message for patchset') |
+ parser.add_option('--message-file', dest='message_file', |
+ help='file which contains message for patchset') |
parser.add_option('-t', dest='title', |
help='title for patchset (Rietveld only)') |
parser.add_option('-r', '--reviewers', |
@@ -3780,6 +3782,12 @@ def CMDupload(parser, args): |
options.reviewers = cleanup_list(options.reviewers) |
options.cc = cleanup_list(options.cc) |
+ if options.message_file: |
+ if options.message: |
+ parser.error('only one of --message and --message-file allowed.') |
+ options.message = gclient_utils.FileRead(options.message_file) |
+ options.message_file = None |
+ |
# For sanity of test expectations, do this otherwise lazy-loading *now*. |
settings.GetIsGerrit() |