Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Running git-review

Scott Lavender October 25, 2012

I am trying to create a custom action in Sourcetree to execute 'git review' on a repo with committed changes. The simple script fails to run with the output:

review.sh /Users/slavender/git/ci 
launch path not accessible
Completed with errors, see above

Bash script:

#!/bin/bash
cd $1
git review

Any ideas?

1 answer

1 accepted

2 votes
Answer accepted
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 25, 2012

You'll need to specify the full path to review.sh because Mac OS X apps do not inherit your terminal's path. Alternatively you need to add the path to /etc/paths and reboot.

Scott Lavender October 25, 2012

I did that...

Scott Lavender October 25, 2012

I even add the full path to git to the script contents... Same error.

Scott Lavender October 25, 2012

Getting closer...

review.sh /Users/slavender/git/ci 
git: 'review' is not a git command. See 'git --help'.
Completed with errors, see above

git-review is installed and I can execute this command manually from the command line.

stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 25, 2012

Does review.sh have the executable bit set?

chmod +x /path/to/review.sh

stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 28, 2012

Since this is a custom extension you'll need to tell SourceTree to use your system version of Git instead of its own. In Preferences > Git, click the Use System Git button and point to your system git install (it may pick it up by default but just check it's the right path)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events