Index: git_cl.py |
diff --git a/git_cl.py b/git_cl.py |
index a1f58c8561f8129afd9cab9cf3de775fd5864d87..b8f688cfbfb23c17c7340608daa95a037b21663d 100755 |
--- a/git_cl.py |
+++ b/git_cl.py |
@@ -3580,7 +3580,8 @@ def CMDdescription(parser, args): |
parser.add_option('-d', '--display', action='store_true', |
help='Display the description instead of opening an editor') |
parser.add_option('-n', '--new-description', |
- help='New description to set for this issue (- for stdin)') |
+ help='New description to set for this issue (- for stdin, ' |
+ '+ to load from local commit HEAD)') |
_add_codereview_select_options(parser) |
auth.add_auth_options(parser) |
@@ -3619,6 +3620,10 @@ def CMDdescription(parser, args): |
text = options.new_description |
if text == '-': |
text = '\n'.join(l.rstrip() for l in sys.stdin) |
+ elif text == '+': |
+ base_branch = cl.GetCommonAncestorWithUpstream() |
+ merge_base = RunGit(['merge-base', base_branch, 'HEAD']).strip() |
+ text = CreateDescriptionFromLog([merge_base]) |
agable
2016/09/02 16:43:00
This produces a commit message which is not of the
dnj
2016/09/02 17:31:40
I don't think this is correct. When I run the comm
agable
2016/09/02 17:43:39
Ah. We develop differently. I often have 2-10 comm
dnj
2016/09/02 18:05:55
I revised this to do the same thing "git cl upload
|
description.set_description(text) |
else: |