GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Fork of sr/git-wiki
Description: A wiki engine that uses a Git repository as its data store.
Homepage: http://atonie.org/2008/02/git-wiki
Clone URL: git://github.com/al3x/git-wiki.git
added patch file download
schacon (author)
Sat Mar 08 11:32:06 -0800 2008
commit  fb02f55ffc054d8120c39f403e115c8506c0c8dd
tree    1b89f437905f4a7407a51f5b67b03fa09d9c4ffb
parent  c97c066c51bbca39e09b34f4517e9c420f854140
...
85
86
87
 
 
 
 
 
 
 
88
89
90
...
85
86
87
88
89
90
91
92
93
94
95
96
97
0
@@ -85,6 +85,13 @@ end
0
   end
0
 end
0
 
0
+get '/a/patch/:page/:rev' do
0
+ @page = Page.new(page_with_ext)
0
+ header 'Content-Type' => 'text/x-diff'
0
+ header 'Content-Disposition' => 'filename=patch.diff'
0
+ @page.delta(params[:rev])
0
+end
0
+
0
 get '/a/tarball' do
0
   header 'Content-Type' => 'application/x-gzip'
0
   header 'Content-Disposition' => 'filename=archive.tgz'
...
1
2
3
 
4
5
6
...
1
2
3
4
5
6
7
0
@@ -1,6 +1,7 @@
0
 <h1>Diff of <a href="/<%= @page.name %>"><%= @page.name %></a></h1>
0
 
0
 <div class="sub_nav">
0
+ <a href="/a/patch/<%= @page.name %>/<%= params[:rev] %>" class="nav_link">patch file</a> &bull;
0
   <a href="/h/<%= @page.name %>" class="nav_link">history</a> &bull;
0
   <a href="/e/<%= @page.name %>" class="nav_link">edit</a>
0
 </div>

Comments

    No one has commented yet.