File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,9 @@ def self.find_all
28
28
29
29
def self . find_or_create ( name , rev = nil )
30
30
path = name + GitWiki . extension
31
- tree = rev ? GitWiki . repository . commit ( rev ) . tree : GitWiki . repository . tree
32
- blob = tree /path || Grit :: Blob . create ( GitWiki . repository , :name => path )
33
- new ( blob )
31
+ commit = GitWiki . repository . commit ( rev || GitWiki . repository . head . commit )
32
+ blob = commit . tree /path
33
+ new ( blob || Grit :: Blob . create ( GitWiki . repository , :name => path ) )
34
34
end
35
35
36
36
def self . wikify ( content )
@@ -75,7 +75,8 @@ def to_html
75
75
end
76
76
77
77
def log
78
- GitWiki . repository . log ( 'master' , @blob . name ) . map { |commit | commit . to_hash }
78
+ head = GitWiki . repository . head . name
79
+ GitWiki . repository . log ( head , @blob . name ) . map { |commit | commit . to_hash }
79
80
end
80
81
81
82
def save! ( data , msg )
You can’t perform that action at this time.
0 commit comments