public
Description: The Git TextMate Bundle
Homepage: http://tim.theenchanter.com/
Clone URL: git://github.com/timcharper/git-tmbundle.git
Search Repo:
changed log.limit variable to git-tmbundle.log.limit, to namespace out the 
bundle's configuration seperately from other configuration variables.

maintain ability to pass in a custom :limit to the log_controller.
timcharper (author)
Thu Apr 10 16:19:22 -0700 2008
commit  834419cb6eb671921b11e9d1657640866eb10e34
tree    2150cbf95c7afbfe6dbe699f7bd7176a14d7f606
parent  553fda601a187789340a09ff37eee44bfc87f6fe
...
15
16
17
18
19
 
20
21
22
...
15
16
17
 
 
18
19
20
21
0
@@ -15,8 +15,7 @@ class LogController < ApplicationController
0
   
0
   def index
0
     params[:path] ||= git.make_local_path(git.paths.first)
0
- params[:limit] = git.config[:global, "log.limit"]
0
- params[:limit] ||= DEFAULT_LOG_LIMIT
0
+ params[:limit] ||= git.config["git-tmbundle.log.limit"] || DEFAULT_LOG_LIMIT
0
     path = params[:path]
0
     # Get the desired revision number
0
     if File.directory?(git.git_base + path)
...
1
2
3
 
 
 
4
5
6
7
 
8
9
10
...
12
13
14
15
16
17
 
 
 
 
 
 
 
18
19
20
21
...
1
 
 
2
3
4
5
6
7
 
8
9
10
11
...
13
14
15
 
16
17
18
19
20
21
22
23
24
25
26
27
28
0
@@ -1,10 +1,11 @@
0
 <h1>Config</h1>
0
-<form>
0
- <table>
0
+<p>Values are saved when the form-field loses focus.</p>
0
+<form onsubmit="return false">
0
+ <table class="listing">
0
     <thead>
0
       <tr>
0
         <th>Global Config</th>
0
-<!-- <th>Local Config Config</th>-->
0
+<th>Local Config Config</th>
0
       </tr>
0
     </thead>
0
     <tbody>
0
@@ -12,9 +13,15 @@
0
         <td>
0
           Name: <%= content_tag :input, :type => "text", :value => git.config[:global, "user.name"], :onchange => "dispatch({controller: 'config', action: 'set', scope: 'global', key: 'user.name', value: $F(this)})" %><br/>
0
           Email: <%= content_tag :input, :type => "text", :value => git.config[:global, "user.email"], :onchange => "dispatch({controller: 'config', action: 'set', scope: 'global', key: 'user.email', value: $F(this)})" %><br/>
0
- Log limit: <%= content_tag :input, :type => "text", :value => git.config[:global, "log.limit"] || LogController::DEFAULT_LOG_LIMIT, :onchange => "dispatch({controller: 'config', action: 'set', scope: 'global', key: 'log.limit', value: $F(this)})" %><br/>
0
         </td>
0
       </tr>
0
+ <tr>
0
+ <td>
0
+ Log limit: <%= content_tag :input, :type => "text", :value => git.config[:global, "git-tmbundle.log.limit"], :onchange => "dispatch({controller: 'config', action: 'set', scope: 'global', key: 'git-tmbundle.log.limit', value: $F(this)})" %><br/>
0
+ </td>
0
+ <td>
0
+ Log limit: <%= content_tag :input, :type => "text", :value => git.config[:local, "git-tmbundle.log.limit"], :onchange => "dispatch({controller: 'config', action: 'set', scope: 'local', key: 'git-tmbundle.log.limit', value: $F(this)})" %><br/>
0
+ </td>
0
     </tbody>
0
   </table>
0
 </form>
0
\ No newline at end of file

Comments

    No one has commented yet.