Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix track remote/branch pattern match

  • Loading branch information...
commit de8d5ae93b3bbc28b951512ba0e774ffb2d4b6fa 1 parent 68aa2c0
@orefalo authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 fish/g2.fish
View
4 fish/g2.fish
@@ -536,7 +536,7 @@ function __g2_track --argument-names branch
command git rev-parse; or return 1
if test "$branch"
- if test (echo $branch | grep -e '^[\[\]()a-zA-Z0-9\._\-]*/[\[\]()a-zA-Z0-9\._\-]*$' | wc -l) -ne 1
+ if test (echo $branch | grep -e '^[()a-zA-Z0-9\._\-]*/[()a-zA-Z0-9\._\-]*$' | wc -l) -ne 1
__g2_fatal "The remote branch mush be specified in the form remote/branchname."
return 1
end
@@ -623,7 +623,7 @@ function __g2_co --argument-names branch
command git rev-parse; or return 1
# check if it's a hash
- if test -z (echo "$branch" | grep -e '^[0-9A-Fa-f]*$')
+ if test -z (echo "$branch" | grep -e '^[()a-zA-Z0-9\._\-]*$')
if test (command git branch -a | grep -c "$branch") -gt 0
__g2_abort
Please sign in to comment.
Something went wrong with that request. Please try again.