This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 0b74e9c Give access to :git section of repository.yml
0b74e9c is described below
commit 0b74e9c329a72783717059063ef874a999472339
Author: Sebb <[email protected]>
AuthorDate: Mon Nov 25 20:11:47 2019 +0000
Give access to :git section of repository.yml
---
lib/whimsy/asf/git.rb | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/whimsy/asf/git.rb b/lib/whimsy/asf/git.rb
index de5fa6b..2e3d084 100644
--- a/lib/whimsy/asf/git.rb
+++ b/lib/whimsy/asf/git.rb
@@ -34,6 +34,7 @@ module ASF
@semaphore = Mutex.new
@@repository_mtime = nil
+ @@repository_entries = nil
#
# Scan a list of git directories, looking for local clones.
@@ -49,6 +50,7 @@ module ASF
unless @repos
@@repository_mtime = File.exist?(REPOSITORY) &&
File.mtime(REPOSITORY)
+ @@repository_entries = YAML.load_file(REPOSITORY)
@repos = Hash[Dir[*git].map { |name|
next unless Dir.exist? name.untaint
@@ -66,6 +68,12 @@ module ASF
end
end
+ # Get all the Git repo entries
+ def self.repo_entries
+ self.repos # refresh @@repository_entries
+ @@repository_entries[:git]
+ end
+
#
# Find a local git clone. Raises an exception if not found.
#