| Issue 414: | Pushing multiple commits with the same Change-Id should be rejected? | |
| 14 people starred this issue and may be notified of changes. | Back to list |
Affected Version: 2.1.1.1 Environment: What steps will reproduce the problem? 1. Make 2 local commits. Make sure the second commit has the same Change-Id line as the first one 2. Push the commits for code review with git push What is the expected output? What do you see instead? Should probably error with "squash commits first". Instead it seems to work, it's creating 2 changes that have the same Change-Id (which may result ins other problems later I think). Please provide any additional information below.
Jan 22, 2010
#1
di...@google.com
Jan 22, 2010
(No comment was entered for this change.)
Status:
Accepted
Feb 3, 2010
Hello Everyone, I am having a problem related to this. I made an initial commit and pushed it for review. Eventually if there is any other changes to be done i am having to do another commit with the --amend option (which does not create a new commit). I have realized that for some reason i can not do another commit even with the same change-id because when i push it i complains saying "squash commits first". What is the reason for not being able to push the "new" commit ? Best Regards, David
Feb 3, 2010
Sounds like you're trying to push multiple commits to the same change (at least that's the case when I got squash commits message). It should work just fine to amend an existent commit (that was pushed as a patch set on a Gerrit change that is not yet closed) and push it to the same change (that's the normal work flow I think).
Apr 6, 2010
Depending on how problematic this is going to make things in the future, this issue could be quite serious for us. For example, we just migrated to a new kernel branch. Every developer who had outstanding work on the old branch now has to cherry-pick their changes to the new kernel branch. Without a rejection of the change-id lines, we're going to end up with a good number of duplicated changeIds in the system.
Feb 2, 2011
Someone in our team hit this problem again. After creating the duplicate Change-Id changes as I described above (by mistake) he then tried to update one of the commits (with git commit --amend, maintaining the Change-Id) and obviously that doesn't work since Gerrit can't uniquely identify the change that needs updated: ! [remote rejected] HEAD -> refs/for/master (Ia530c9b1729abc9baead3016121a41ab081c5b46 has duplicates)
Mar 9, 2011
I've pushed a fix for this problem to Gerrit for review: https://review.source.android.com/21691
Apr 7, 2011
(No comment was entered for this change.)
Status:
Submitted
Labels: FixedIn-2.1.7
May 31, 2011
(No comment was entered for this change.)
Status:
Released
|
|
| ► Sign in to add a comment |