diff options
Diffstat (limited to 'lib/chef/knife/core/cookbook_scm_repo.rb')
-rw-r--r-- | lib/chef/knife/core/cookbook_scm_repo.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/chef/knife/core/cookbook_scm_repo.rb b/lib/chef/knife/core/cookbook_scm_repo.rb index 4779bb5405..ceb3ba3de7 100644 --- a/lib/chef/knife/core/cookbook_scm_repo.rb +++ b/lib/chef/knife/core/cookbook_scm_repo.rb @@ -21,7 +21,6 @@ require "chef/mixin/shell_out" class Chef class Knife class CookbookSCMRepo - DIRTY_REPO = /^[\s]+M/ include Chef::Mixin::ShellOut @@ -31,7 +30,7 @@ class Chef attr_reader :use_current_branch attr_reader :ui - def initialize(repo_path, ui, opts={}) + def initialize(repo_path, ui, opts = {}) @repo_path = repo_path @ui = ui @default_branch = "master" @@ -119,7 +118,7 @@ class Chef end def branch_exists?(branch_name) - git("branch --no-color").stdout.lines.any? {|l| l =~ /\s#{Regexp.escape(branch_name)}(?:\s|$)/ } + git("branch --no-color").stdout.lines.any? { |l| l =~ /\s#{Regexp.escape(branch_name)}(?:\s|$)/ } end def get_current_branch() @@ -153,8 +152,6 @@ class Chef def git(command) shell_out!("git #{command}", :cwd => repo_path) end - end end end - |