mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
fix some quoting in git-pull-request and ensure the remote is available
This commit is contained in:
parent
8b3040ed1b
commit
c66e9536fe
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue