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:
commit
260194fe5a
1 changed files with 10 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue