Open nbarbey opened 6 months ago
Hi @nbarbey could you give me some more information how gerrit works and how your gerrit is configured? I just tried it myself with a gerrit running locally with docker. There I am able to do a mob start and mob next. So are you just allowed to push to refs/for? Would it be ok to push there? As I understood gerrit this creates a code review for someone else. Is that a problem?
Hello @hollesse ! Thank you for answering this ! Yes, gerrit is set up at my company in a way that we are only allowed to push to refs/for. Indeed, it creates a "code review"/"pull request" there. This is a mandatory step before merging the commit anyway. So that would be ok to have the temporary branch of the session there I think. Also there is a way to send to refs/for without triggering the CI tests by suffixing the branch name to %wip, putting the code review into a "Work In Progress" state.
Okay it seems that we would need an configuration to create a custom git reference and if this is set use this instead of heads. Would you like to contribute and create a pull request for that @nbarbey ?
I tried this a bit. I struggled to warp my head into the code with the little time I had. When I stopped it seemed to me that head was implicit in some of the calls to the git command but I could not figure out where. Perhaps we should mob this out ;-)
@nbarbey correct the head is implicit right now. We would need to make it explicit and afterwards configurable. I like the idea of doing it in a mob, but I need to check if I can find time for that. @gregorriegler Do you know if maybe you could find some time for that?
@hollesse I am up for it, but would have to be an evening. Something like 17:00 - 19:00
Would it be possible to add an option to push the temporary branch to a gerrit server ? This would require to be able to push to gerrit "magic" refs/for/ instead of refs/heads For now when I try to use mob with a gerrit server I get this error :