Bug ID: 63067
           Summary: Gerrit does not recognize a commit it should already
           Product: Wikimedia
           Version: wmf-deployment
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Git/Gerrit
       Web browser: ---
   Mobile Platform: ---


I am trying to maintain our own copy of Composer ( ) in a Gerrit repository
integration/composer.git which would be used for deployments.

The workflow I envision is:

- a branch 'upstream' which is a copy of composer master branch
- a branch 'master' in which we merge upstream tags then update the
dependencies and create an additional commit containing the dependencies.

When tagging a new version, upstream creates a commit which is not in their
master branch and tag it. Their latest tag 1.0.0-alpha8 is an annotated tag.

When I push my merge commit to refs/for/master Gerrit complains because the
commit pointed to the tag does not contain a Change-Id.  Since I pushed to
Gerrit the tag, it should already know both the annotated tag and the commit
object it points to.  It sounds like a bug in Gerrit to me.

How to reproduce:

 git clone ssh://
 cd composer

The master branch only has a .gitreview file.

We have local tags:

$ git tag

And Gerrit has the tags:

$ git ls-remote origin refs/tags/*
fd9fb49cdd80692dc3ba3709275426cea35b1471    refs/tags/1.0.0-alpha1
a2a060752be8cb69b6992ad2df982b512b1bc432    refs/tags/1.0.0-alpha2
b28b76f34b94cf116b8af5dcc8585074d4f02ffc    refs/tags/1.0.0-alpha3
2880cb628f1fd3ee0817419b2fc27fff6a46968f    refs/tags/1.0.0-alpha4
d2ca1a4ef6d728a4ae8eb0b4ac5c37439d85fadb    refs/tags/1.0.0-alpha5
0c8158f47d7dda89226d4e816fee1fb9ac6c1204    refs/tags/1.0.0-alpha6
3e6afd8975b6ff6eb3045ba00e532d6c0e302fe6    refs/tags/1.0.0-alpha7
22c43685024d04d491985caae930b0b3fdc3a30c    refs/tags/1.0.0-alpha8
1eb1df44a97fb2daca1bb8b007f3bee012f0aa46    refs/tags/1.0.0-alpha8^{}

Now I want to merge in 1.0.0-alpha8 to our master branch:

My master branch now looks like:

$ git log --oneline --decorate --graph -n 5
*   7655c59 (HEAD, master) Merge tag '1.0.0-alpha8'
| * 1eb1df4 (tag: 1.0.0-alpha8) Release 1.0.0-alpha8
| * fd297bc Update changelog
| * 7ad2d95 Update deps
| * bc153ea Clean up var name
| <...>
* 9e585ee (origin/master, origin/HEAD) Initial commit

I then attempt to propose my merge commit for review:

$ git push origin master:refs/for/master
Counting objects: 12, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 309 bytes | 0 bytes/s, done.
Total 2 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1)
remote: Processing changes: refs: 1, done    
remote: ERROR: missing Change-Id in commit message footer
remote: Suggestion for commit message:
remote: Release 1.0.0-alpha8
remote: Change-Id: I1eb1df44a97fb2daca1bb8b007f3bee012f0aa46
remote: Hint: To automatically insert Change-Id, install the hook:
remote:   gitdir=$(git rev-parse --git-dir); scp -p -P 29418 ${gitdir}/hooks/
To ssh://
 ! [remote rejected] master -> refs/for/master (missing Change-Id in commit
message footer)
error: failed to push some refs to

So although Gerrit has the tag object and the commit it points to:

 22c43685024d04d491985caae930b0b3fdc3a30c    refs/tags/1.0.0-alpha8
 1eb1df44a97fb2daca1bb8b007f3bee012f0aa46    refs/tags/1.0.0-alpha8^{}

It bails out.

I thought git push --tags  only push the references and does not push the
target objects. But giblit seems to know boths suggesting Gerrit has both

I think there is a failure in Gerrit logic which can not find one of the two
object, possibly because it is an annotated tag.

Extended git log:

*   commit 8274b97c2738bb540a04cc8335218aaf4f2d97aa (HEAD, master)
|\  Merge: 9e585ee 1eb1df4
| | Author: Antoine Musso <>
| | Date:   Tue Mar 25 11:07:57 2014 +0100
| | 
| |     Merge upstream tag '1.0.0-alpha8'
| |     
| |     Release 1.0.0-alpha8
| |     
| |     Change-Id: I887a0f505aa866134cae59ef6f4c3270a5daaa47
| |   
| * commit 1eb1df44a97fb2daca1bb8b007f3bee012f0aa46 (tag: 1.0.0-alpha8)
| | Author: Jordi Boggiano <>
| | Date:   Mon Jan 6 19:39:59 2014 +0100
| | 
| |     Release 1.0.0-alpha8
| |   
| * commit fd297bce9222eea72ab7717b5621414aceefab6a
| | Author: Jordi Boggiano <>
| | Date:   Mon Jan 6 19:37:30 2014 +0100
| | 
| |     Update changelog

Shows that 1eb1df44a97fb2daca1bb8b007f3bee012f0aa46 is indeed missing a
Change-Id but since Gerrit has it it should not complain about it :-D

You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
Wikibugs-l mailing list

Reply via email to