[Engine-devel] New version of git-request-review

Dan Kenigsberg danken at redhat.com
Thu Nov 10 11:03:40 UTC 2011


On Thu, Nov 10, 2011 at 11:51:06AM +0200, Saggi Mizrahi wrote:
> I just finished a version of my git-request-review script.
> 
> For those who are not yet using it it's meant to make sending
> patches to gerrit more streamlined.
> It show you a list of the patches before sending them and also warns
> you if you are not rebased.
> 
> To have it working you need to have a configured remote for gerrit
> already in your git config
> In order for git to detect it as a new verb you have to have this in
> your path
> 
> usage: git request-review <gerrit-remote> <remote-branch>
> 
> eg. git request-review gerrit master
> 
> For those of you who are using the old version will probably notice
> this version forgoes special gerrit configuration and can support
> multiple gerrit servers (just configure more remotes).
> 
> Fixes, features and comments are always welcome.
> 
> Happy reviewing.
> 
> 

> #!/bin/bash
> #
> # Copyright 2011 Saggi Mizrahi <smizrahi at redhat.com>
> #
> # Licensed to you under the GNU General Public License as published by
> # the Free Software Foundation; either version 2 of the License, or
> # (at your option) any later version.  See the files README and
> # LICENSE_GPL_v2 which accompany this distribution.

Nothing accompanies your script! Better don't mention it.

> #
> 
> if [ -z $2 ]; then

here, and everywhere, unquoted bash variable is a syntax error waiting to
happen. if you go over and fix it, better use names for $1 $2.

> 	echo "usage: git request-review <gerrit-remote> <remote-branch>"
> 	exit 1

wouldn't it be nicer to have a config bit for default gerrit-remote? most people
are going to have only one.

> fi
> 

Thanks Saggi for your script, I use it daily.

Dan.



More information about the Engine-devel mailing list