public
Description: probably a waste of time
Clone URL: git://github.com/claude/git_local.git
Search Repo:
Viewing files now, but they're a little weird. I'm thinking it's got 
something to do with the way haml is formatting - maybe?
claude (author)
Sun Apr 27 04:58:12 -0700 2008
commit  04435a863fbbc01de9c254ba728270ec1271f2a3
tree    999745f53682313e624aebe716119e780e0e952d
parent  9dd6940e29a65ea21cb94f64c8b20791cfbd2903
...
34
35
36
37
38
 
 
 
39
40
41
...
34
35
36
 
37
38
39
40
41
42
43
0
@@ -34,8 +34,10 @@
0
   path = request.path_info.gsub("/tree/#{params[:name]}/", '')
0
   if path.split('/').length >= 2
0
     new_tree = path.split('/').pop
0
- new_tree.to_s
0
     @tree = get_repo(params[:name]).tree(new_tree)
0
+ @blob = get_repo(params[:name]).blob(new_tree)
0
+ file_text = "[code lang=\"ruby\"]" + @blob.data + "[/code]"
0
+ @formatted_text = Syntaxi.new(file_text).process
0
   else
0
     @tree = get_repo(params[:name]).tree
0
   end
...
1
2
 
...
1
 
2
0
@@ -1,3 +1,3 @@
0
 %h1 Git Local - Diff
0
-= @formatted_text
0
+%div#diff= @formatted_text
...
1
2
3
4
 
5
6
7
...
1
2
3
 
4
5
6
7
0
@@ -1,7 +1,7 @@
0
 %h1= "Git Local - History"
0
 %ul
0
   - @repo.commits.each do |c|
0
- %li
0
+ %li.sha
0
     %a{:href => "/history/#{params[:name]}/#{c}"}= c
0
     %ul
0
       %li= c.message
...
1
2
3
 
4
5
6
...
27
28
29
30
 
 
 
 
31
32
33
...
1
2
3
4
5
6
7
...
28
29
30
 
31
32
33
34
35
36
37
0
@@ -1,6 +1,7 @@
0
 body
0
   :font-family 'Lucida Grande'
0
   :background-color #608341
0
+ :color #555
0
 
0
 h1
0
   :margin-left 20px
0
@@ -27,7 +28,10 @@
0
   :border solid 4px #E3CF57
0
   :background #fff
0
 
0
-li.commit
0
+div#diff
0
+ :color #000
0
+
0
+li.sha
0
   :margin-top 10px
0
   :color #555
0
 
...
3
4
5
6
 
7
8
9
10
11
 
 
 
...
3
4
5
 
6
7
8
9
10
11
12
13
14
0
@@ -3,10 +3,13 @@
0
   = "viewing: #{request.path_info.gsub('tree/','')}"
0
   %a{:href => "/history/#{params[:name]}"} (history)
0
 %ul
0
- - if @tree != nil
0
+ - if @tree
0
   - @tree.contents.each do |c|
0
   %li
0
     %a{:href => "#{request.path_info}/#{c.name}/#{c.id}"}= c.name
0
   - end
0
   - end
0
+- if @formatted_text && @tree.contents.empty?
0
+%div#file= @formatted_text
0
+- end

Comments

    No one has commented yet.