Commit 1656c6fe7f446c31f374d3ab16ce20a44180f1f3
- Date: Thu May 01 03:33:52 +0000 2008
- Committer: Tim Dysinger (tim@dysinger.net)
- Author: Tim Dysinger (tim@dysinger.net)
- Commit SHA1: 1656c6fe7f446c31f374d3ab16ce20a44180f1f3
- Tree SHA1: 956ce7399e570f605138838a7e324f0af8873fdd
Merge branch 'master' of git://github.com/mojombo/grit
* 'master' of git://github.com/mojombo/grit:
Updated manifest.txt to include new ref & remote classes
added refs super class for tag & head + added remote subclass
Conflicts:
lib/grit/repo.rb
Commit diff
| |   |
| 43 | 43 | File.open(File.join(self.path, 'description')).read.chomp |
| 44 | 44 | end |
| 45 | 45 | |
| 46 | | # An array of Ref objects representing the refs in |
| 47 | | # this repo |
| 48 | | # |
| 49 | | # Returns Grit::Ref[] (baked) |
| 50 | | def refs |
| 51 | | [ Head.find_all(self), Tag.find_all(self), Remote.find_all(self) ].flatten |
| 52 | | end |
| 53 | | |
| 54 | 46 | # An array of Head objects representing the branch heads in |
| 55 | 47 | # this repo |
| 56 | 48 | # |
| … | … | |
| 75 | 75 | Remote.find_all(self) |
| 76 | 76 | end |
| 77 | 77 | |
| 78 | # An array of Ref objects representing the refs in |
| 79 | # this repo |
| 80 | # |
| 81 | # Returns Grit::Ref[] (baked) |
| 82 | def refs |
| 83 | [ Head.find_all(self), Tag.find_all(self), Remote.find_all(self) ].flatten |
| 84 | end |
| 85 | |
| 78 | 86 | # An array of Commit objects representing the history of a given ref/commit |
| 79 | 87 | # +start+ is the branch/commit name (default 'master') |
| 80 | 88 | # +max_count+ is the maximum number of commits to return (default 10) |
| toggle raw diff |
--- a/lib/grit/repo.rb
+++ b/lib/grit/repo.rb
@@ -43,14 +43,6 @@ module Grit
File.open(File.join(self.path, 'description')).read.chomp
end
- # An array of Ref objects representing the refs in
- # this repo
- #
- # Returns Grit::Ref[] (baked)
- def refs
- [ Head.find_all(self), Tag.find_all(self), Remote.find_all(self) ].flatten
- end
-
# An array of Head objects representing the branch heads in
# this repo
#
@@ -83,6 +75,14 @@ module Grit
Remote.find_all(self)
end
+ # An array of Ref objects representing the refs in
+ # this repo
+ #
+ # Returns Grit::Ref[] (baked)
+ def refs
+ [ Head.find_all(self), Tag.find_all(self), Remote.find_all(self) ].flatten
+ end
+
# An array of Commit objects representing the history of a given ref/commit
# +start+ is the branch/commit name (default 'master')
# +max_count+ is the maximum number of commits to return (default 10) |