mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 15:36:21 -04:00
Merge pull request #543 from spacewander/via_ssh
fix the support for forking via ssh
This commit is contained in:
commit
381a0ff1fb
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
abort() {
|
||||
echo $@
|
||||
|
|
@ -16,7 +16,11 @@ read user
|
|||
# extract owner + project from repo url
|
||||
project=${1##*/}
|
||||
owner=${1%/$project}
|
||||
owner=${owner##*/}
|
||||
if [[ $owner == git@* ]]; then
|
||||
owner=${owner##*:}
|
||||
else
|
||||
owner=${owner##*/}
|
||||
fi
|
||||
|
||||
# validate
|
||||
[ -z "$project" -o -z "$owner" ] && abort "github repo needs to be specified as an argument"
|
||||
|
|
|
|||
Loading…
Reference in a new issue