mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 04:51:43 +00:00
parent
d3174c6e3f
commit
8fc054a735
1 changed files with 4 additions and 0 deletions
|
@ -8,6 +8,7 @@ class Site
|
||||||
class Repository
|
class Repository
|
||||||
attr_reader :rugged, :changes, :path
|
attr_reader :rugged, :changes, :path
|
||||||
|
|
||||||
|
# @param [String] la ruta del repositorio
|
||||||
def initialize(path)
|
def initialize(path)
|
||||||
@path = path
|
@path = path
|
||||||
@rugged = Rugged::Repository.new(path)
|
@rugged = Rugged::Repository.new(path)
|
||||||
|
@ -41,6 +42,8 @@ class Site
|
||||||
#
|
#
|
||||||
# XXX: Prestar atención a la velocidad de respuesta cuando tengamos
|
# XXX: Prestar atención a la velocidad de respuesta cuando tengamos
|
||||||
# repositorios remotos.
|
# repositorios remotos.
|
||||||
|
#
|
||||||
|
# @return [Integer]
|
||||||
def fetch
|
def fetch
|
||||||
if origin.check_connection :fetch
|
if origin.check_connection :fetch
|
||||||
@changes = rugged.fetch(origin)[:received_objects]
|
@changes = rugged.fetch(origin)[:received_objects]
|
||||||
|
@ -51,6 +54,7 @@ class Site
|
||||||
|
|
||||||
# Incorpora los cambios en el repositorio actual
|
# Incorpora los cambios en el repositorio actual
|
||||||
#
|
#
|
||||||
|
# @return [Rugged::Commit]
|
||||||
def merge(usuarie)
|
def merge(usuarie)
|
||||||
merge = rugged.merge_commits(head_commit, remote_head_commit)
|
merge = rugged.merge_commits(head_commit, remote_head_commit)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue