commit | 853157fb09aab8c3e486922c714fd3caeba79e9f | [log] [tgz] |
---|---|---|
author | David Pursehouse <david.pursehouse@sonymobile.com> | Wed Apr 22 18:39:28 2015 +0900 |
committer | David Pursehouse <david.pursehouse@sonymobile.com> | Thu Apr 30 08:47:31 2015 +0000 |
tree | 7618954c05446bbafa7377056dbccb2598388bef | |
parent | a1f96d807c42a48ed7cd9f5bc524f987389f617c [diff] |
Allow to push a tag that points to a non-commit object When pushing a tag that points to a non-commit object, like `v2.6.11` on linux-stable [1] which points to a tree, or `spearce-gpg-pub` on jgit [2] which points to a blob, Gerrit rejects the push with the error message 'missing object(s)'. This causes problems in the use case where a repository is being synched from somewhere else, for example Github, and pushed into Gerrit with: git push mirror refs/heads/*:refs/heads/* --tags In the validation of received commits, instead of trying to parse the received object as a commit and failing if it is not, parse it first as any object and return early if it's not a commit. [1] https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/tag/?id=v2.6.11 [2] https://git.eclipse.org/c/jgit/jgit.git/tag/?id=spearce-gpg-pub Bug: Issue 3328 Change-Id: I013c75db9de44e4b562b712bec8dc7381750740a