I'm reverting to perl, since it's working fine for everybody afaik and
unrelated to the purpose of this pull request.

On Mon, Mar 25, 2013 at 6:04 PM, Pierce Lopez <notifications@github.com>wrote:

> In git-open-pull:
>
> > @@ -74,12 +74,17 @@ BASE_BRANCH=`$GIT_CMD config --get gitOpenPull.base || echo "master"`
> >  GITHUB_USER=`$GIT_CMD config --get github.user`
> >  GITHUB_PASSWORD=`$GIT_CMD config --get github.password`
> >  GITHUB_TOKEN=`$GIT_CMD config --get gitOpenPull.token`
> > -FEATURE_BRANCH=`$GIT_CMD describe --contains --all HEAD`
> > -ISSUE_NUMBER=`echo $FEATURE_BRANCH | perl -p -e 's/.*_([0-9]+)$/\1/'`
> > -if [ "$ISSUE_NUMBER" == "$FEATURE_BRANCH" ]; then
> > -    ISSUE_NUMBER="";
> > +FEATURE_BRANCH=`$GIT_CMD rev-parse --abbrev-ref HEAD`
> > +ISSUE_NUMBER=`echo $FEATURE_BRANCH | sed -r -e 's/.*[-_]([0-9]+)$/\1/'`
> > +if [ "$ISSUE_NUMBER" == "$FEATURE_BRANCH" ]; then
> > +    # Some people like to use the number as the prefix, try that.
> > +    ISSUE_NUMBER=`echo $FEATURE_BRANCH | sed -r -e 's/^([0-9]+)[-_].*/\1/'`
>
> If you're suspicious about quoting that regex, [[ ]] has special quoting
> rules in bash. I tested that code snippet in bash-3.2 and bash-4.2 on
> linux, but admittedly not on bash 3.x on OS X, someone should probably do
> that :)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/jehiah/git-open-pull/pull/8/files#r3522160>
> .
>



-- 
http://www.slinkp.com