Skip to content

Commit

Permalink
Removes redundant search on list
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neighman authored and lachlanhardy committed Oct 9, 2008
1 parent dec557f commit 10d511e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/gitjour/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ class GitService < Struct.new(:name, :host, :port, :repository, :path, :descript
def url
"git://#{host.gsub(/\.$/,"")}#{port == 9418 ? "" : ":#{port}"}/#{path}"
end
def search_content
[name, host, repository, description, prefix]
end
end

class Application
Expand All @@ -19,7 +22,7 @@ class << self
def run(*args)
case args.shift
when "list"
list(*args)
list
when "serve"
serve(*args)
when "remote"
Expand Down Expand Up @@ -56,9 +59,8 @@ def service_list_display(service_list, *rest)
lines
end

def list(*rest)
services = service_list
puts service_list_display(services, *rest)
def list
puts service_list_display(service_list)
end

def serve(path=Dir.pwd, *rest)
Expand Down Expand Up @@ -130,10 +132,8 @@ def help
puts "Serve up and use git repositories via Bonjour/DNSSD."
puts "\nUsage: gitjour <command> [args]"
puts
puts " list [search]"
puts " list"
puts " Lists available repositories."
puts " Specify --local to see yours too."
puts " search will search for any repositories that may match the content"
puts
puts " serve <path_to_project> [<name_of_project>] [<port>] or"
puts " <path_to_projects>"
Expand Down

0 comments on commit 10d511e

Please sign in to comment.