Run file age check, only if we can get a value from __fisher_get_file_age.

This probably means the user does not have python installed on their
system and we will be download the index every time the user runs
ls-remote.

A more sensitive, python-less solution to check file age since the last
time the file was modified should be more desirable.
This commit is contained in:
Jorge Bucaran 2016-05-01 12:37:29 +09:00
parent f6a25a32ef
commit 4d0cf5dfb4
No known key found for this signature in database
GPG key ID: E54BA3C0E646DB30

View file

@ -817,8 +817,10 @@ function __fisher_remote_index_update
end
if test -s "$index"
if test (__fisher_get_file_age "$index") -lt "$interval"
return
if set -l file_age (__fisher_get_file_age "$index")
if test "$file_age" -lt "$interval"
return
end
end
end