<commit_before>export class CannotRestoreError extends Error { }

export default class FileDiscardHistory {
  constructor(createBlob, restoreBlob, setConfig) {
    this.createBlob = createBlob;
    this.restoreBlob = restoreBlob;
    this.setConfig = setConfig;
    this.blobHistoryByFilePath = {};
  }

  async storeBlobs(filePath, isSafe, destructiveAction) {
    const beforeSha = await this.createBlob({filePath});
    const isNotSafe = !(await isSafe());
    if (isNotSafe) { return; }
    destructiveAction();<commit_msg>:shirt:<commit_after>export class CannotRestoreError extends Error { }

export default class FileDiscardHistory {
  constructor(createBlob, restoreBlob, setConfig) {
    this.createBlob = createBlob;
    this.restoreBlob = restoreBlob;
    this.setConfig = setConfig;
    this.blobHistoryByFilePath = {};
  }

  async storeBlobs(filePath, isSafe, destructiveAction) {
    const beforeSha = await this.createBlob({filePath});
    const isNotSafe = !(await isSafe());
    if (isNotSafe) { return null; }
    destructiveAction();
{'fraction_non_alphanumeric': 0.10256410256410256, 'fraction_numerical': 0.0, 'mean_word_length': 4.5473684210526315, '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': '2868066', 'n_tokens_mistral': 305, 'n_tokens_neox': 302, 'n_words': 70}