public
Fork of Caged/gitnub
Description: A Gitk-like application written in RubyCocoa that looks like it belongs on a Mac. See the wiki for downloads and screenshots.
Homepage: http://alternateidea.com
Clone URL: git://github.com/andrewlmurray/gitnub.git
Search Repo:
Update grit which fixes a bug with file mode only diffs.  Also tweak a 
couple css rules making some text a little more readable
Caged (author)
Thu Mar 06 15:21:39 -0800 2008
commit  ed692f03f1f2639ab1206c8ee97c65a62b2f1570
tree    352a21ca8912e196e3a874f7d92d89fd0d5d1463
parent  ad51a42473ea86018f3ea2ae197ed0fbdd46c7a7
...
105
106
107
108
 
109
110
111
...
117
118
119
120
 
 
 
 
 
121
122
123
...
105
106
107
 
108
109
110
111
...
117
118
119
 
120
121
122
123
124
125
126
127
0
@@ -105,7 +105,7 @@ module Grit
0
     
0
     # Find all commits matching the given criteria.
0
     # +repo+ is the Repo
0
- # +ref+ is the ref from which to begin (SHA1 or name)
0
+ # +ref+ is the ref from which to begin (SHA1 or name) or nil for --all
0
     # +options+ is a Hash of optional arguments to git
0
     # :max_count is the maximum number of commits to fetch
0
     # :skip is the number of commits to skip
0
@@ -117,7 +117,11 @@ module Grit
0
       default_options = {:pretty => "raw"}
0
       actual_options = default_options.merge(options)
0
       
0
- output = repo.git.rev_list(actual_options, ref)
0
+ if ref
0
+ output = repo.git.rev_list(actual_options, ref)
0
+ else
0
+ output = repo.git.rev_list(actual_options.merge(:all => true))
0
+ end
0
       
0
       self.list_from_string(repo, output)
0
     end
...
33
34
35
36
 
37
38
39
...
67
68
69
70
71
 
...
33
34
35
 
36
37
38
39
...
67
68
69
 
70
71
0
@@ -33,7 +33,7 @@ module Grit
0
           m, b_mode = *lines.shift.match(/^new mode (\d+)/)
0
         end
0
         
0
- if lines.first =~ /^diff --git/
0
+ if lines.empty? || lines.first =~ /^diff --git/
0
           diffs << Diff.new(repo, a_path, b_path, nil, nil, a_mode, b_mode, false, false, nil)
0
           next
0
         end
0
@@ -67,4 +67,4 @@ module Grit
0
     end
0
   end # Diff
0
   
0
-end # Grit
0
\ No newline at end of file
0
+end # Grit
...
87
88
89
 
90
91
92
93
 
 
94
95
96
...
87
88
89
90
91
92
 
 
93
94
95
96
97
0
@@ -87,10 +87,11 @@ module Grit
0
     # Commits are returned in chronological order.
0
     # +start+ is the branch/commit name (default 'master')
0
     # +since+ is a string represeting a date/time
0
+ # +extra_options+ is a hash of extra options
0
     #
0
     # Returns Grit::Commit[] (baked)
0
- def commits_since(start = 'master', since = '1970-01-01')
0
- options = {:since => since}
0
+ def commits_since(start = 'master', since = '1970-01-01', extra_options = {})
0
+ options = {:since => since}.merge(extra_options)
0
       
0
       Commit.find_all(self, start, options)
0
     end
...
12
13
14
 
 
 
...
12
13
14
15
16
17
0
@@ -12,3 +12,6 @@ index 9ec1bac..1c4f83b
0
      "django.middleware.common.CommonMiddleware",
0
      "django.contrib.sessions.middleware.SessionMiddleware",
0
      "django.contrib.auth.middleware.AuthenticationMiddleware",
0
+diff --git a/moo b/moo
0
+old mode 100755
0
+new mode 100644
...
11
12
13
14
 
15
 
16
17
...
11
12
13
 
14
15
16
17
18
0
@@ -11,7 +11,8 @@ class TestDiff < Test::Unit::TestCase
0
     output = fixture('diff_new_mode')
0
     
0
     diffs = Diff.list_from_string(@r, output)
0
- assert_equal 1, diffs.size
0
+ assert_equal 2, diffs.size
0
     assert_equal 10, diffs.first.diff.split("\n").size
0
+ assert_equal nil, diffs.last.diff
0
   end
0
 end
...
6
7
8
9
 
10
11
12
...
18
19
20
21
22
 
...
6
7
8
 
9
10
11
12
...
18
19
20
 
21
22
0
@@ -6,7 +6,7 @@ class TestGit < Test::Unit::TestCase
0
   end
0
   
0
   def test_method_missing
0
- assert_match(/^git version [\d\.]*$/, @git.version)
0
+ assert_match(/^git version [\w\.]*$/, @git.version)
0
   end
0
   
0
   def test_transform_options
0
@@ -18,4 +18,4 @@ class TestGit < Test::Unit::TestCase
0
     
0
     assert_equal ["-s", "-t"], @git.transform_options({:s => true, :t => true}).sort
0
   end
0
-end
0
\ No newline at end of file
0
+end
...
72
73
74
 
75
76
77
...
84
85
86
87
 
88
89
90
...
72
73
74
75
76
77
78
...
85
86
87
 
88
89
90
91
0
@@ -72,6 +72,7 @@ h1 {
0
   padding: 9px;
0
   margin: 9px;
0
   line-height: 130%;
0
+ color: #222;
0
 }
0
 
0
 #hash {
0
@@ -84,7 +85,7 @@ h1 {
0
 #date {
0
   font-family: "Apple Garamond", Times, Georgia, serif;
0
   font-size: 150%;
0
- color: #ccc;
0
+ color: #aaa;
0
   font-style: italic;
0
   text-align: center;
0
   padding: 6px;

Comments

    No one has commented yet.