New issue
Advanced search Search tips

Issue 809625 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

git cl issue 0 only removes most recent issue?

Project Member Reported by ashleymarie@chromium.org, Feb 6 2018

Issue description

I could have a fundamental misunderstanding of how git cherry-pick and git cl issue work but I was confused when I accidentally uploaded a new cl to an old issue with the following workflow:

What steps will reproduce the problem?
(1) cherry-pick one issue (git fetch && git cherry-pick FETCH_HEAD)
(2) cherry-pick a second issue
(3) make some changes and add a new commit
(4) git cl issue
(says there's no associated issue number)
(4) git cl issue 0
removes a change-id
(5) git cl issue 0
no issue number
(6) git cl upload
(7) cl with all three commits gets uploaded to the first cherry-picked cl's issue # as an initial upload

Copy pasted from my terminal:
ashleymarie@ashleymarie01:~/chromium/src$ git cl issue
Issue number: None (None)
ashleymarie@ashleymarie01:~/chromium/src$ git cl issue 0
WARNING: The change patched into this branch has a Change-Id. Removing it.
Issue number: None (None)
ashleymarie@ashleymarie01:~/chromium/src$ git cl issue
Issue number: None (None)
ashleymarie@ashleymarie01:~/chromium/src$ git cl issue 0
Issue number: None (None)

What is the expected result?
git cl issue would list if a patched in change has a change-id
git cl issue 0 would clear all related issue #s
git cl upload after git cl issue 0 would upload to a new issue
 

Comment 1 by aga...@chromium.org, Feb 13 2018

Owner: aga...@chromium.org
Status: Started (was: Untriaged)
When you upload a "new" branch (i.e. one that is either truly new, or has had "git cl issue 0" run on it), git-cl-upload should prompt you to set the commit description, and it should auto-populate that with the concatenation of the commit messages on all commits in your branch. At that point you could have removed the other Change-Ids.

That said I guess it makes sense for git-cl-issue 0 to try to do this for more than just one commit. Here's a start: https://chromium-review.googlesource.com/#/c/chromium/tools/depot_tools/+/914858
Ah that makes sense, thank you! In the future, I'll be sure to remove the other Change-Ids :)
Owner: ----
Status: Available (was: Started)
Unassigning from myself because I'm on sabbatical.

Sign in to add a comment