return Grit::Commit objects instead of Gollum::Version

This commit is contained in:
Tom Preston-Werner
2010-04-11 12:30:45 -06:00
parent 61076b38b4
commit 9b412d200b
4 changed files with 5 additions and 24 deletions
+3 -5
View File
@@ -76,11 +76,9 @@ module Gollum
# All of the versions that have touched this Page.
#
# Returns an Array of Gollum::Version.
# Returns an Array of Grit::Commit.
def versions
@wiki.repo.log('master', self.path).map do |v|
Version.new(v)
end
@wiki.repo.log('master', self.path)
end
# Find a page in the given Gollum repo.
@@ -91,7 +89,7 @@ module Gollum
def find(name)
commit = self.wiki.repo.commits.first
if page = find_page_in_tree(commit.tree, name)
page.version = Version.new(commit)
page.version = commit
page
else
nil
-16
View File
@@ -1,16 +0,0 @@
module Gollum
class Version
attr_accessor :commit
def initialize(commit)
self.commit = commit
end
# The SHA1 commit ID.
#
# The String ID.
def id
self.commit.id
end
end
end