Fix listing of github-style cloned repos.

This commit is contained in:
Joshua Nichols
2010-05-18 20:42:45 -04:00
parent f0c67f9653
commit 3efee55f03
2 changed files with 15 additions and 4 deletions

View File

@@ -75,9 +75,11 @@ class Homesick < Thor
desc "list", "List cloned castles"
def list
Pathname.glob(repos_dir + "*") do |castle|
#require 'ruby-debug'; breakpoint
Pathname.glob("#{repos_dir}/**/*/.git") do |git_dir|
castle = git_dir.dirname
Dir.chdir castle do # so we can call git config from the right contxt
say_status castle.basename.to_s, `git config remote.origin.url`.chomp, :cyan
say_status castle.relative_path_from(repos_dir), `git config remote.origin.url`.chomp, :cyan
end
end
end