mirror of
https://github.com/paulirish/git-open.git
synced 2026-09-10 07:26:15 -04:00
Simplify $remote_url building
This commit is contained in:
parent
5fd2b37e9e
commit
c91fbaa4ed
8
git-open
8
git-open
|
|
@ -19,13 +19,7 @@ fi
|
|||
|
||||
# assume origin if not provided
|
||||
# fallback to upstream if neither is present.
|
||||
remote="origin"
|
||||
if [ ! -z "$1" ]
|
||||
then
|
||||
remote="$1"
|
||||
fi
|
||||
|
||||
remote_url="remote.${remote}.url"
|
||||
remote_url="remote.${1:-origin}.url"
|
||||
|
||||
giturl=$(git config --get $remote_url)
|
||||
if [ -z "$giturl" ]
|
||||
|
|
|
|||
Loading…
Reference in a new issue