summaryrefslogtreecommitdiff
path: root/lib/chef/chef_fs/file_system.rb
diff options
context:
space:
mode:
authorJohn Keiser <jkeiser@opscode.com>2013-05-07 10:07:21 -0700
committerJohn Keiser <jkeiser@opscode.com>2013-06-07 13:12:32 -0700
commit9fabc2ea4d024d5910c3e23c7be19b1d2c93c7ad (patch)
tree1e9de4767717ebdbdf76e3b27011613c8c2826fb /lib/chef/chef_fs/file_system.rb
parent395cb75b0cd7aca6d4af27823417b247236676b9 (diff)
downloadchef-9fabc2ea4d024d5910c3e23c7be19b1d2c93c7ad.tar.gz
Add --no-diff option to allow download/upload of only new files
Diffstat (limited to 'lib/chef/chef_fs/file_system.rb')
-rw-r--r--lib/chef/chef_fs/file_system.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/chef/chef_fs/file_system.rb b/lib/chef/chef_fs/file_system.rb
index 385f955806..000a5cf90f 100644
--- a/lib/chef/chef_fs/file_system.rb
+++ b/lib/chef/chef_fs/file_system.rb
@@ -369,8 +369,10 @@ class Chef
return
else
- # Both are files! Copy them unless we're sure they are the same.
- if options[:force]
+ # Both are files! Copy them unless we're sure they are the same.'
+ if options[:diff] == false
+ should_copy = false
+ elsif options[:force]
should_copy = true
src_value = nil
else