<commit_before>require "multirepo/git/git"
require_relative "meta-file"
require_relative "lock-file"

module MultiRepo
  class TrackingFiles
    FILE_CLASSES = [MetaFile, LockFile]
    
    def self.update
      return FILE_CLASSES.any? { |c| c.update }
    end
    
    def self.stage
      FILE_CLASSES.each do |c|
        Git.run_in_current_dir("add -A #{c::FILENAME}", Runner::Verbosity::OUTPUT_ON_ERROR)
      end
    end
    
    def self.commit(message)
      stage
      pathspec = FILE_CLASSES.map{ |c| c::FILENAME }.join(" ")
      Git.run_in_current_dir("commit -m \"#{message}\" -o -- #{pathspec}", Runner::Verbosity::OUTPUT_ON_ERROR)
    end
    
    def self.delete
      FILE_CLASSES.each { |c| FileUtils.rm_f(c::FILENAME) }
    end
  end
end<commit_msg>Force-adding tracking files, in case projects' gitignore patterns match important multirepo files.<commit_after>require "multirepo/git/git"
require_relative "meta-file"
require_relative "lock-file"

module MultiRepo
  class TrackingFiles
    FILE_CLASSES = [MetaFile, LockFile]
    
    def self.update
      return FILE_CLASSES.any? { |c| c.update }
    end
    
    def self.stage
      FILE_CLASSES.each do |c|
        Git.run_in_current_dir("add --force #{c::FILENAME}", Runner::Verbosity::OUTPUT_ON_ERROR)
      end
    end
    
    def self.commit(message)
      stage
      pathspec = FILE_CLASSES.map{ |c| c::FILENAME }.join(" ")
      Git.run_in_current_dir("commit -m \"#{message}\" -o -- #{pathspec}", Runner::Verbosity::OUTPUT_ON_ERROR)
    end
    
    def self.delete
      FILE_CLASSES.each { |c| FileUtils.rm_f(c::FILENAME) }
    end
  end
end
{'fraction_non_alphanumeric': 0.12100737100737101, 'fraction_numerical': 0.0, 'mean_word_length': 3.0024570024570023, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2122195', 'n_tokens_mistral': 589, 'n_tokens_neox': 566, 'n_words': 118}