<commit_before>#ifndef SOTA_CLIENT_TOOLS_OSTREE_REPO_H_
#define SOTA_CLIENT_TOOLS_OSTREE_REPO_H_

#include "ostree_hash.h"
#include "ostree_object.h"

class OSTreeRef;
class OSTreeRepo : private boost::noncopyable {
 public:
  virtual bool LooksValid() const = 0;
  virtual OSTreeObject::ptr GetObject(const OSTreeHash hash) const = 0;
  virtual OSTreeObject::ptr GetObject(const uint8_t sha256[32]) const = 0;
  virtual const std::string root() const = 0;
  virtual OSTreeRef GetRef(const std::string& refname) const = 0;
};

/**
 * Thrown by GetObject when the object requested is not present in the
 * repository.
 */
class OSTreeObjectMissing : std::exception {
 public:
  OSTreeObjectMissing(const OSTreeHash _missing_object) : missing_object_(_missing_object) {}

  virtual const char* what() const noexcept { return "OSTree repository is missing an object"; }

  OSTreeHash missing_object() const { return missing_object_; }

 private:
  OSTreeHash missing_object_;
};
// vim: set tabstop=2 shiftwidth=2 expandtab:
#endif  // SOTA_CLIENT_TOOLS_OSTREE_REPO_H_<commit_msg>Introduce OSTreeRepo::ptr typedef<commit_after>#ifndef SOTA_CLIENT_TOOLS_OSTREE_REPO_H_
#define SOTA_CLIENT_TOOLS_OSTREE_REPO_H_

#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>

#include "ostree_hash.h"
#include "ostree_object.h"

class OSTreeRef;

/**
 * A source repository to read OSTree objects from. This can be either a directory
 * on disk, or a URL in the garage-deploy case.
 */
class OSTreeRepo : private boost::noncopyable {
 public:
  typedef boost::shared_ptr<OSTreeRepo> ptr;

  virtual bool LooksValid() const = 0;
  virtual OSTreeObject::ptr GetObject(const OSTreeHash hash) const = 0;
  virtual OSTreeObject::ptr GetObject(const uint8_t sha256[32]) const = 0;
  virtual const std::string root() const = 0;
  virtual OSTreeRef GetRef(const std::string& refname) const = 0;
};

/**
 * Thrown by GetObject when the object requested is not present in the
 * repository.
 */
class OSTreeObjectMissing : std::exception {
 public:
  OSTreeObjectMissing(const OSTreeHash _missing_object) : missing_object_(_missing_object) {}

  virtual const char* what() const noexcept { return "OSTree repository is missing an object"; }

  OSTreeHash missing_object() const { return missing_object_; }

 private:
  OSTreeHash missing_object_;
};
// vim: set tabstop=2 shiftwidth=2 expandtab:
#endif  // SOTA_CLIENT_TOOLS_OSTREE_REPO_H_
{'fraction_non_alphanumeric': 0.09233305853256389, 'fraction_numerical': 0.010717230008244023, 'mean_word_length': 5.559459459459459, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '3802418', 'n_tokens_mistral': 831, 'n_tokens_neox': 798, 'n_words': 223}