public
Description: A quick & dirty git-powered Sinatra wiki
Homepage: http://atonie.org/2008/02/git-wiki
Clone URL: git://github.com/sr/git-wiki.git
Protect us from a git error occurring when editing a page with an 
unmodified content
sr (author)
Tue May 06 11:48:38 -0700 2008
commit  382951cd8a254dc0c5d534b499d15888bcca4189
tree    42c6b163baad9d4224161a3ab2b44315d1f6a85b
parent  ac3e67ae29d492f59eb537801da13f7ddd01207e
...
37
38
39
 
40
41
42
43
44
45
 
 
 
46
47
48
...
37
38
39
40
41
 
 
 
 
 
42
43
44
45
46
47
0
@@ -37,12 +37,11 @@ class Page
0
   end
0
 
0
   def body=(content)
0
+ return if content == raw_body
0
     File.open(@filename, 'w') { |f| f << content }
0
- if Page.repo.status.changed.map{ |s| s.first}.include?(@name)
0
- message = tracked? ? "Edited #{@name}" : "Created #{@name}"
0
- Page.repo.add(@name)
0
- Page.repo.commit(message)
0
- end
0
+ message = tracked? ? "Edited #{@name}" : "Created #{@name}"
0
+ Page.repo.add(@name)
0
+ Page.repo.commit(message)
0
   end
0
 
0
   def tracked?

Comments

    No one has commented yet.