[asterisk-users] Gerrit usage?

Joshua Colp jcolp at digium.com
Fri Sep 29 10:27:53 CDT 2017


On Fri, Sep 29, 2017, at 12:16 PM, Daniel Tryba wrote:
> I'm trying to figure out how to commit some code for review. Following:
> https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage
> 
> Created a ssh alias.
> Cloned using: "git clone ssh://asterisk/asterisk"
> Set name and email.
> Installed the gerrit commit hook: "git review -s"
> Try to change to asterisk 13 for creating a patch: "git checkout 13"
> This fails with:
> error: pathspec '13' did not match any file(s) known to git.
> 
> 
> "git checkout -b 13" appears to fix this.

This did not create a branch from 13. This created a branch named "13"
from the branch you were on, which was most likely master. That is why
your "git review" is not working as you expect, because you are telling
it that you did the work against "13" but it really was against master.

git checkout -b 13 origin/13

Would create a local branch "13" which is from the remote branch "13".
You'll need to do this, or do your "git review" against master and then
cherry pick from inside Gerrit to the appropriate branches.

-- 
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-users mailing list