5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-29 08:26:21 +00:00

Merge branch 'issue-17359' into production.panel.sutty.nl

This commit is contained in:
f 2024-09-06 13:41:56 -03:00
commit 260194fe5a
No known key found for this signature in database

View file

@ -46,11 +46,19 @@ class Site
private
# Trae el último commit indexado desde el repositorio
# Trae el último commit indexado desde el repositorio, o si no
# existe, trae el primer commit.
#
# @return [Rugged::Commit]
def indexed_commit
@indexed_commit ||= repository.rugged.lookup(last_indexed_commit)
@indexed_commit ||=
if repository.rugged.exists?(last_indexed_commit)
repository.rugged.lookup(last_indexed_commit)
else
repository.rugged.lookup(
repository.rugged.references[repository.rugged.head.canonical_name].log.first[:id_new]
)
end
end
# Calcula la diferencia entre el último commit indexado y el