[Openstack] [Gerrit] Getting "invalid author"

James E. Blair corvus at inaugust.com
Thu Aug 4 20:53:22 UTC 2011


Yuriy Taraday <yorik.sar at gmail.com> writes:

> I have series of commits that can be applied separately and can be treated
> as separate improvements in my branch.
> That commits were there before I knew that I should install Gerrit hook.
> Now I have bunch of commits without Change-Id while commit --amend works
> only with the last one. How can I edit previous commits?

One way to do that would be to make a new branch, and cherry-pick each
of the commits in order onto that branch, and after cherry-picking each,
run git commit --amend to cause the change-id hook to run.

If they are independent of each other, you might want to take the time
to rebase each one as you go.  If not, that's fine, Gerrit will wait
till they are all approved before applying them.

Something like:

  git checkout master
  git checkout -b temp
  git cherry-pick <oldest sha1 of patch series>
  git commit --amend
  git cherry-pick <2nd oldest sha1 of patch series>
  git commit --amend
  ...
  git cherry-pick <newest sha1 of patch series>
  git commit --amend
  git review
  
However, we turned on the requirement to have Change-Ids to _prevent_
problems, not _cause_ them.  Since this isn't likely to happen again
(now that you have the change-id hook installed) feel free to find Monty
or I (mtaylor or jeblair) in IRC, and we can temporarily remove the
Change-Id requirement and then you can push your patches as they are.

-Jim




More information about the Openstack mailing list