`git cl upload` ignores -t flag with gerrit |
||||
Issue descriptionI committed a bunch of stuff to a branch and then ran `git cl upload -t "Do some stuff"`, expecting "Do some stuff" to appear in $EDITOR. Instead, $EDITOR only contained the commit messages of my local commits and it ignored the -t parameter.
,
Dec 14 2016
,
Jan 6 2017
So the rietveld behavior is this: * If you're creating a new issue and don't specify a message, it defaults to title (if specified) plus recent commit history (and opens an editor to confirm) * If you don't specify a title, it defaults to first line of message * If you don't specify that, it defaults to the first line of the most recent commit (and prompts to confirm) * If you don't specify a message, the message becomes the same as the title * If you're creating a new issue: * title becomes the issue title * message becomes the issue commit message * whitespace becomes the patchset description * If you're uploading a new patchset to an existing issue: * title becomes the patchset description * message becomes the body of the email message The gerrit behavior is close but not quite the same. It is: * If you're creating a new issue: * if you don't specify a message, it defaults to recent commit history (and opens an editor to confirm) * if you don't specify a title, it defaults to 'Initial upload' * message becomes the commit description * first line of message becomes the CL title * title becomes the patchset description * If you're uploading a patchset to an existing issue: * if you don't specify a title, it defaults to the first line of the most recent commit message (and prompts to confirm) * title becomes the patchset description * message is ignored So the things that need to be fixed are: * Gerrit needs to prepend title to message before opening an editor to confirm * If you specify a message for non-initial upload, it should send an email Here's a CL for the former: https://chromium-review.googlesource.com/425823 And I'm not going to fix the latter because few people use it and gerrit doesn't support it anyway.
,
Jan 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/b56ad33d008b7589b20f853c3126d89760a4e508 commit b56ad33d008b7589b20f853c3126d89760a4e508 Author: Aaron Gable <agable@chromium.org> Date: Fri Jan 06 23:24:31 2017 Respect -t/--title in initial cl uploads to Gerrit BUG= 674254 Change-Id: Icdc572648dfffeca7e28f327e085f64985221ce9 Reviewed-on: https://chromium-review.googlesource.com/425823 Commit-Queue: Aaron Gable <agable@chromium.org> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org> [modify] https://crrev.com/b56ad33d008b7589b20f853c3126d89760a4e508/git_cl.py [modify] https://crrev.com/b56ad33d008b7589b20f853c3126d89760a4e508/tests/git_cl_test.py
,
Jan 11 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by andyb...@chromium.org
, Dec 14 2016