Omit trailing .git from url when comparing git remote urls.
This commit is contained in:
parent
94d9c2affe
commit
0108e2c64e
1 changed files with 2 additions and 1 deletions
|
@ -56,7 +56,8 @@ download_git() {
|
|||
elif (( ! HOLDVER )); then
|
||||
cd_safe "$dir"
|
||||
# Make sure we are fetching the right repo
|
||||
if [[ "$url" != "$(git config --get remote.origin.url)" ]] ; then
|
||||
local remote_url="$(git config --get remote.origin.url)"
|
||||
if [[ "${url%%.git}" != "${remote_url%%.git}" ]] ; then
|
||||
error "$(gettext "%s is not a clone of %s")" "$dir" "$url"
|
||||
plainerr "$(gettext "Aborting...")"
|
||||
exit 1
|
||||
|
|
Loading…
Add table
Reference in a new issue