Wireshark-dev: Re: [Wireshark-dev] Git-review (was: Re: Fix bug in GSM MAP, have problems with
From: Guy Harris <[email protected]>
Date: Tue, 11 Mar 2014 12:01:37 -0700
On Mar 11, 2014, at 11:18 AM, Hadriel Kaplan <[email protected]> wrote:

> I see you have the 'pip install git-review' stuff on that page... fwiw, I've never gotten git-review to work on my Mac.  I got it installed with pip, but issuing any 'git review' command doesn't work.  I don't *think* it's a path problem, but instead whatever mechanics git-review did to hook itself into git's command parser

Git's command parser appears to be something similar to

	system("git-" || the arguments to git);

where "||" is the concatenation operator (yes, I learned PL/I in my youth; why do you ask? :-)).

I.e., if you do

	git blahblahblah foo bar bletch

it tries to run the command

	git-blahblahblah foo bar bletch

> (through Python it seems)

	$ which git-review
	$ file `which git-review`
	/usr/local/bin/git-review: Python script, ASCII text executable

so git-review is just a Python script with a #! header, so that an exec-family call (which includes posix_spawn() on systems, such as newer versions of OS X, that have it) on that file will run the Python interpreter on it.

> Was there some secret magic you had to do besides 'pip install git-review'?

The only thing I had to do on my Mac, running 10.8.5, was to:

	remove the old copy of pip I'd installed a while ago (as it couldn't handle the current git-review package for some reason);

	installed the latest version of pip;

and then run "pip install git-review".