My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
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
Status:  Released
Owner:  ----
Closed:  Apr 2011


Sign in to add a comment
 
Reported by di...@google.com, Jan 22, 2010
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
Forgot to mention, I'm pushing multiple commits with a Change-Id that has no change 
created yet in Gerrit. When trying to push multiple commits with an existent change 
Change-Id Gerrit correctly rejects that with a "squash commits first" error message.
Jan 22, 2010
#2 sop@google.com
(No comment was entered for this change.)
Status: Accepted
Feb 3, 2010
#3 dpsmarq...@gmail.com
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
#4 di...@google.com
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
#5 dav...@codeaurora.org
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
#6 di...@google.com
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
Project Member #7 edwin.ke...@gmail.com
I've pushed a fix for this problem to Gerrit for review:
https://review.source.android.com/21691

Apr 7, 2011
#8 sop@google.com
(No comment was entered for this change.)
Status: Submitted
Labels: FixedIn-2.1.7
May 31, 2011
#9 sop@google.com
(No comment was entered for this change.)
Status: Released
Sign in to add a comment

Powered by Google Project Hosting