Moving the ref to be an argument to the parents that defaults to the @wiki.ref

This commit is contained in:
Randy Merrill
2011-01-27 12:46:29 -08:00
parent a71ab7c418
commit 364b2b85ae
+2 -2
View File
@@ -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