ignore git repos in scrub
This commit is contained in:
parent
810e460a15
commit
e03c18b36a
1 changed files with 7 additions and 1 deletions
8
scrub
8
scrub
|
|
@ -22,6 +22,10 @@ class Scrubber
|
|||
@status = :ok
|
||||
end
|
||||
|
||||
def git_repo?(path)
|
||||
File.exist?(File.join(path, '.git'))
|
||||
end
|
||||
|
||||
def scrub(dir = @root_dir)
|
||||
scrub_file = scrub_filename(dir)
|
||||
if File.exist?(File.join(dir, 'noscrub'))
|
||||
|
|
@ -43,7 +47,9 @@ class Scrubber
|
|||
|
||||
# descend into subdirectories
|
||||
if File.directory?(file)
|
||||
scrub(file)
|
||||
|
||||
# ignore git repos as the contents may change and git can fsck itself
|
||||
scrub(file) unless git_repo?(file)
|
||||
|
||||
# scrub this file
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue