Skip to content

Commit 381a0ff

Browse files
authored
Merge pull request #543 from spacewander/via_ssh
fix the support for forking via ssh
2 parents 1f374d1 + 34f5245 commit 381a0ff

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

bin/git-fork

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env sh
1+
#!/usr/bin/env bash
22

33
abort() {
44
echo $@
@@ -16,7 +16,11 @@ read user
1616
# extract owner + project from repo url
1717
project=${1##*/}
1818
owner=${1%/$project}
19-
owner=${owner##*/}
19+
if [[ $owner == git@* ]]; then
20+
owner=${owner##*:}
21+
else
22+
owner=${owner##*/}
23+
fi
2024

2125
# validate
2226
[ -z "$project" -o -z "$owner" ] && abort "github repo needs to be specified as an argument"

0 commit comments

Comments
 (0)