try to fix the update function.
This commit is contained in:
parent
1c86899ea7
commit
c8917b1486
@ -47,7 +47,12 @@ export DIALOGOPTS='--no-lines --visit-items'
|
||||
|
||||
# Check for updates
|
||||
check_update() {
|
||||
local branch="$(git rev-parse --abbrev-ref HEAD)"
|
||||
local url="$(git ls-remote --get-url)"
|
||||
if [[ "$url" =~ ^ssh://|git@ ]] || [[ -z "$url" ]]; then
|
||||
return
|
||||
fi
|
||||
git fetch
|
||||
local branch="$(git rev-parse --abbrev-ref HEAD 2> /dev/null)"
|
||||
local localSha="$(git rev-parse origin/${branch})"
|
||||
local remoteSha="$(git rev-parse refs/remotes/origin/${branch})"
|
||||
if [[ "${localSha}" == "${remoteSha}" ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user