def signature
      hook_config = @config.for_hook(@hook_name, @context.hook_class_name).
                            dup.
                            tap { |config| IGNORED_CONFIG_KEYS.each { |k| config.delete(k) } }

      content_to_sign =
        if signable_file?(hook_path) && Overcommit::GitRepo.tracked?(hook_path)
          hook_contents
        end

      Digest::SHA256.hexdigest(content_to_sign.to_s + hook_config.to_s)
    end
def signature
      hook_config = @config.for_hook(@hook_name, @context.hook_class_name).
                            dup.
                            tap { |config| IGNORED_CONFIG_KEYS.each { |k| config.delete(k) } }

      content_to_sign =
        if signable_file?(hook_path) && Overcommit::GitRepo.tracked?(hook_path)
          hook_contents
        end

      Digest::SHA256.hexdigest(content_to_sign.to_s + hook_config.to_s)
    end
Calculates a hash of a hook using a combination of its configuration and
 file contents.

 This way, if either the plugin code changes or its configuration changes,
 the hash will change and we can alert the user to this change.