Fixed some errors in url handling.
This commit is contained in:
parent
e79eaac3ec
commit
8434b851e8
5
pre-push
5
pre-push
@ -5,9 +5,10 @@
|
|||||||
# url is $2
|
# url is $2
|
||||||
url="${2#*@}"
|
url="${2#*@}"
|
||||||
url="${url%.git}"
|
url="${url%.git}"
|
||||||
|
url="${url#*://}"
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
url="${url/:*([0-9])//}"
|
url="${url/:([0-9]+)//}"
|
||||||
url="https://${url//\/\///}"
|
url="https://${url}"
|
||||||
branch="$(git branch | grep "\* ")"
|
branch="$(git branch | grep "\* ")"
|
||||||
branch="${branch:2}"
|
branch="${branch:2}"
|
||||||
commit="$(git log -1 --pretty=%B)"
|
commit="$(git log -1 --pretty=%B)"
|
||||||
|
Loading…
Reference in New Issue
Block a user