Merge pull request #837 from jldugger/jldugger/pr-remote-default

add a default for the remote to fetch a pr from
This commit is contained in:
罗泽轩 2020-05-16 12:12:21 +08:00 committed by GitHub
commit 4eb4e7ffdb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,7 +59,8 @@ if test "$1" = "clean"; then
done
elif [[ "$1" =~ ^[0-9]+$ ]]; then
remote=${2:-origin}
remote_pref=${2:-$(git config --get git-extras.pr.remote)}
remote=${remote_pref:-origin}
id=$1
branch=pr/$id
pull "$remote" "$id" "$branch"