Moving the ref to be an argument to the parents that defaults to the @wiki.ref
This commit is contained in:
@@ -60,9 +60,9 @@ module Gollum
|
||||
# Public: The parent commits to this pending commit.
|
||||
#
|
||||
# Returns an array of Grit::Commit instances.
|
||||
def parents
|
||||
def parents(ref = @wiki.ref)
|
||||
@parents ||= begin
|
||||
arr = [@options[:parent] || @wiki.repo.commit(@wiki.ref)]
|
||||
arr = [@options[:parent] || @wiki.repo.commit(ref)]
|
||||
arr.flatten!
|
||||
arr.compact!
|
||||
arr
|
||||
|
||||
Reference in New Issue
Block a user