Skip to content

Commit

Permalink
Monkey-patch ruby-git library to speed up branch retrieval.
Browse files Browse the repository at this point in the history
  • Loading branch information
ccallebs committed Jun 14, 2016
1 parent 1bdd46a commit 2af2243
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/git/lib.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module Git
class Lib
def config_list
build_list = lambda do |path|
parse_config_list command_lines('config', ['--list'])
end

@config_list ||= begin
if @git_dir
Dir.chdir(@git_dir, &build_list)
else
build_list.call
end
end
end
end
end
1 change: 1 addition & 0 deletions lib/git_left.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require_relative "git/lib"
require_relative "git_left/version"
require_relative "git_left/branch"
require_relative "git_left/branch_reporter"
Expand Down

0 comments on commit 2af2243

Please sign in to comment.