New issue
Advanced search Search tips

Issue 742730 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

"git cl issue 0" replaces commit message to the message I committed before.

Project Member Reported by yyanagisawa@chromium.org, Jul 14 2017

Issue description

OS: linux (not sure also occur on other platforms or not)

What steps will reproduce the problem?
(1) create a change list and git cl upload.
(2) git change (1) has been merged.
(3) git pull --rebase
(4) does new development
(5) "git commit -a" to create a patch.
(6) $ git cl issue 0
WARNING: The change patched into this branch has a Change-Id. Removing it.
Issue number: None (None)

Ah, the commit message I wrote in (5) has gone. X(

What is the expected result?
Preserves commit message I wrote in (5).

What happens instead?
After (6) commit message is replaced to what I have written in (1).

 
Components: Infra>Codereview>Gerrit
Noticing the same issue, my commit messages are clobbered every time I try to reset the issue to 0, need to copy the message and commit --amend to fix.

Comment 2 by aga...@chromium.org, Jul 19 2017

Components: -Infra>Git Infra>SDK
Owner: aga...@chromium.org
Status: Started (was: Untriaged)
Good catch! Fix here: https://chromium-review.googlesource.com/578229
Project Member

Comment 3 by bugdroid1@chromium.org, Jul 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/tools/depot_tools/+/ca01e2c8dc422db8166f382a1618decac61ae416

commit ca01e2c8dc422db8166f382a1618decac61ae416
Author: Aaron Gable <agable@chromium.org>
Date: Thu Jul 20 00:11:56 2017

git cl issue 0: Remove Change-Id from message, not description

Using self.GetDescription() uses the description from the web.
Given that the user is purposefully disassociating their current
branch from the review on the web, they may have already changed
the commit message. We shouldn't set it back.

Bug:  742730 
Change-Id: I0545cb6288c332fd475d1de7fb302f71ee41a415
Reviewed-on: https://chromium-review.googlesource.com/578229
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>

[modify] https://crrev.com/ca01e2c8dc422db8166f382a1618decac61ae416/tests/git_cl_test.py
[modify] https://crrev.com/ca01e2c8dc422db8166f382a1618decac61ae416/git_cl.py

Comment 4 by aga...@chromium.org, Jul 20 2017

Status: Fixed (was: Started)

Sign in to add a comment