<commit_before>desc 'Shows the created, modified and deleted files'
arg_name ''
command :status do |c|
  c.action do |global_options, options, args|
    repository = global_options[:repository]
    commit     = repository.resolve(:head, :commit)
    status     = repository.status commit,
                                   ignore: [/^\.|\/\./]

    if repository.head.nil?
      puts "# No commits"
    else
      puts "# On branch #{repository.head}"
      puts "# On commit #{commit.id.yellow}"
    end

    puts

    if status.none? { |_, files| files.any? }
      puts "# No changes"
    end

    if status[:changed].any?
      puts "# Changed:"
      puts status[:changed].map { |file| "+-  #{file}".yellow }
      puts
    end

    if status[:created].any?
      puts "# New:"
      puts status[:created].map { |file| "+   #{file}".green }
      puts
    end

    if status[:deleted].any?
      puts "# Deleted:"<commit_msg>`scv status` now tells the next commit parents (if > 1)<commit_after>desc 'Shows the created, modified and deleted files'
arg_name ''
command :status do |c|
  c.action do |global_options, options, args|
    repository = global_options[:repository]
    commit     = repository.resolve(:head, :commit)
    status     = repository.status commit,
                                   ignore: [/^\.|\/\./]

    if repository.head.nil?
      puts "# No commits"
    else
      puts "# On branch #{repository.head}"
      puts "# On commit #{commit.id.yellow}"
    end

    if repository.config['merge'] and repository.config['merge']['parents']
      parents = repository.config['merge']['parents']

      puts
      puts "# Next commit parents:"

      parents.each do |commit_id|
        puts "#     - #{commit_id.yellow}"
      end
    end

    puts

    if status.none? { |_, files| files.any? }
      puts "# No changes"
    end

    if status[:changed].any?
      puts "# Changed:"
      puts status[:changed].map { |file| "+-  #{file}".yellow }
      puts
    end

    if status[:created].any?
      puts "# New:"
      puts status[:created].map { |file| "+   #{file}".green }
      puts
    end

    if status[:deleted].any?
      puts "# Deleted:"
{'fraction_non_alphanumeric': 0.143184947223497, 'fraction_numerical': 0.0004589261128958238, 'mean_word_length': 2.1778425655976674, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3181181', 'n_tokens_mistral': 654, 'n_tokens_neox': 659, 'n_words': 176}