<commit_before>require 'fileutils'

pulled, skipped, failed = [], [], []

root = ARGF.argv[0]

raise ArgumentError.new("Please pass a root directoy!") if root.nil?
raise ArgumentError.new("Please pass a valid root directoy!") unless File.directory?(root)

Dir.foreach(root) do |directory|
  if File.directory?(directory)
    FileUtils.cd(directory)

    if File.directory?('.git')
      puts "Pulling: #{directory}"
      `git fetch -p`
      `git merge --ff-only origin/master`
    end

    unless $?.success?
      failed << directory
    else
      pulled << directory
    end

    FileUtils.cd(root)
  else
    skipped << directory
  end
end

puts "Pulled\t#{pulled.inspect}"
puts "Skipped\t#{skipped.inspect}"
puts "Failed\t#{failed.inspect}"<commit_msg>Add directory skipping<commit_after>require 'fileutils'

pulled, skipped, failed = [], [], []

root = ARGF.argv[0]

raise ArgumentError.new("Please pass a root directoy!") if root.nil?
raise ArgumentError.new("Please pass a valid root directoy!") unless File.directory?(root)

SKIPPED_DIRECTORIES = ['.DS_Store']

Dir.foreach(root) do |directory|
  if File.directory?(directory)
    unless SKIPPED_DIRECTORIES.include?(directory)
      FileUtils.cd(directory)

      if File.directory?('.git')
        puts "Pulling: #{directory}"
        `git fetch -p`
        `git merge --ff-only origin/master`
      end

      unless $?.success?
        failed << directory
      else
        pulled << directory
      end

      FileUtils.cd(root)
    end
  else
    skipped << directory
  end
end

puts "Pulled\t#{pulled.inspect}"
puts "Skipped\t#{skipped.inspect}"
puts "Failed\t#{failed.inspect}"
{'fraction_non_alphanumeric': 0.13479052823315119, 'fraction_numerical': 0.0012143290831815423, 'mean_word_length': 3.3141361256544504, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6145003', 'n_tokens_mistral': 540, 'n_tokens_neox': 541, 'n_words': 132}