Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does git-review work?

I want to know, how exactly does git review command work? I mean does it use git push command (internally) or something else to upload the changes to gerrit. This information would be useful for me while writing git hooks for git review.

like image 503
Yo Yo Money Singh Avatar asked Jan 04 '15 11:01

Yo Yo Money Singh


1 Answers

From the fine manual:

When you submit a change, git review does the following things:

  • it looks up which branch to push to (production or whatever) in the .gitreview file. If it can't find this information, it pushes to master
  • it figures out what "topic" to put on the revision (you can set the topic manually with -t)
    • if you're resubmitting a downloaded change, it will reuse the tag of the original change
    • if your commit summary contains a bug number like bug 12345, the tag will be bug/12345
    • otherwise, the tag will be the name of your local branch
  • it rebases your change against the HEAD of the branch you're pushing to (use -R to skip this)
  • if you are submitting more than one change at once, or submitting a change that's based on another unmerged change, it will ask you whether you really meant to do that (use -y to skip this)
  • it pushes the change for review
like image 187
Eugene Yarmash Avatar answered Oct 20 '22 20:10

Eugene Yarmash