Removing the ref as an argument to the Committer#parents and just using the @wiki.ref.

Updated the test to reflect the change and to test creating a wiki with a custom ref returns the correct parent for the `Committer#parents`.
This commit is contained in:
Randy Merrill
2011-01-27 13:59:39 -08:00
parent 7427ddd900
commit e3950d52c1
2 changed files with 5 additions and 4 deletions
+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(ref = @wiki.ref)
def parents()
@parents ||= begin
arr = [@options[:parent] || @wiki.repo.commit(ref)]
arr = [@options[:parent] || @wiki.repo.commit(@wiki.ref)]
arr.flatten!
arr.compact!
arr