public
Fork of timcharper/git-tmbundle
Description: The official github mirror for the Git TextMate Bundle
Homepage: http://tim.theenchanter.com/
Clone URL: git://github.com/subtleGradient/git-tmbundle.git
Search Repo:
Merge branch 'release' of git://gitorious.org/git-tmbundle/mainline
Sat Apr 12 09:15:25 -0700 2008
commit  d412b01401cbcef3609fe89f2843f1eb44f86db0
tree    cc62bff28145402da346c999f4cad2469f3ba00b
parent  eee924fa15e7e73a53aebe93cc1dd9349ee5b919 parent  92585e874fcf5f455bdf934be57ed63f25ebd849
...
14
15
16
17
 
18
19
20
...
14
15
16
 
17
18
19
20
0
@@ -14,7 +14,7 @@
0
   <key>keyEquivalent</key>
0
   <string>^G</string>
0
   <key>name</key>
0
- <string>Pushh</string>
0
+ <string>Push Current Branch</string>
0
   <key>output</key>
0
   <string>showAsHTML</string>
0
   <key>uuid</key>
...
15
16
17
18
 
19
20
21
...
15
16
17
 
18
19
20
21
0
@@ -15,7 +15,7 @@
0
   
0
   def index
0
     params[:path] ||= git.make_local_path(git.paths.first)
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
11
...
12
13
14
 
15
16
 
 
 
 
 
 
 
17
18
19
...
 
 
 
1
2
3
4
5
6
 
 
7
8
9
10
11
12
...
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
+<h1>Git Config</h1>
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>Global</th>
0
+ <th>Local</th>
0
       </tr>
0
     </thead>
0
     <tbody>
0
0
@@ -12,8 +13,16 @@
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>
...
8
9
10
11
 
 
 
 
 
 
 
12
13
14
...
8
9
10
 
11
12
13
14
15
16
17
18
19
20
0
@@ -8,7 +8,13 @@
0
   def []=(*params)
0
     value = params.pop
0
     scope, key = process_keys(params)
0
- base.command(*(["config"] + config_args(scope) + [key, value]))
0
+ args = ["config"] + config_args(scope)
0
+ if value
0
+ args += [key, value]
0
+ else
0
+ args += ["--unset", key]
0
+ end
0
+ base.command(*args)
0
   end
0
   
0
   protected
...
32
33
34
 
 
 
 
35
36
37
...
32
33
34
35
36
37
38
39
40
41
0
@@ -32,6 +32,10 @@
0
     Git.commands_ran.first.should == ["config", "--file", "/base/.git/config", "remote.origin.url", "../origin"]
0
   end
0
   
0
+ it "should delete local values when assigning nil" do
0
+ @git.config[:local, "git-tmbundle.log.limit"] = nil
0
+ Git.commands_ran.first.should == ["config", "--file", "/base/.git/config", "--unset", "git-tmbundle.log.limit"]
0
+ end
0
   
0
   it "should allow reading global values" do
0
     Git.command_response["config", "--global", "remote.origin.url"] = "../origin"

Comments

    No one has commented yet.