<commit_before>class Twig
  class Branch

    RESERVED_BRANCH_PROPERTIES    = %w[merge remote]
    PROPERTY_NAME_FROM_GIT_CONFIG = /^branch\.[^.]+\.([^=]+)/

    attr_accessor :twig, :name

    def self.all_properties
      @_all_properties ||= begin
        properties = Twig.run('git config --list').split("\n").
                        map do |var|
                          match_data = PROPERTY_NAME_FROM_GIT_CONFIG.match(var)
                          match_data[1] if match_data
                        end.compact
        properties.uniq.sort - RESERVED_BRANCH_PROPERTIES
      end
    end

    def initialize(twig, name)
      self.twig = twig
      raise ArgumentError, '`twig` is required' unless twig.respond_to?(:repo?)

      self.name = name
      raise ArgumentError, '`name` is required' if name.empty?
    end
<commit_msg>Add `rebase` to list of reserved branch properties<commit_after>class Twig
  class Branch

    RESERVED_BRANCH_PROPERTIES    = %w[merge rebase remote]
    PROPERTY_NAME_FROM_GIT_CONFIG = /^branch\.[^.]+\.([^=]+)/

    attr_accessor :twig, :name

    def self.all_properties
      @_all_properties ||= begin
        properties = Twig.run('git config --list').split("\n").
                        map do |var|
                          match_data = PROPERTY_NAME_FROM_GIT_CONFIG.match(var)
                          match_data[1] if match_data
                        end.compact
        properties.uniq.sort - RESERVED_BRANCH_PROPERTIES
      end
    end

    def initialize(twig, name)
      self.twig = twig
      raise ArgumentError, '`twig` is required' unless twig.respond_to?(:repo?)

      self.name = name
      raise ArgumentError, '`name` is required' if name.empty?
    end

{'fraction_non_alphanumeric': 0.10208816705336426, 'fraction_numerical': 0.001160092807424594, 'mean_word_length': 2.0748663101604277, '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': '4357562', 'n_tokens_mistral': 547, 'n_tokens_neox': 526, 'n_words': 118}