fix some quoting in git-pull-request and ensure the remote is available

This commit is contained in:
TJ Holowaychuk 2012-06-29 13:23:19 -07:00
parent 8b3040ed1b
commit c66e9536fe

View file

@ -31,7 +31,11 @@ test -z "$user" && abort "git config user.email required"
# branch
branch=${1-$(git symbolic-ref HEAD)}
branch=${1-$(git symbolic-ref HEAD | sed 's/refs\/heads\///')}
# make sure it's pushed
git push origin $branch || abort "failed to push $branch"
# lame hack to get project
@ -48,6 +52,7 @@ echo
# create pull request
body=$(json $title $body $branch)
body=$(json "$title" "$body" $branch)
echo curl -u "$user" "https://api.github.com/repos/$project/pulls" -d "$body"
curl -u "$user" "https://api.github.com/repos/$project/pulls" -d "$body"