<commit_before>'use babel'

import { Emitter } from 'atom'

let instance
export default class GitPearModel {
  currentPair = {
    author: null,
    committer: null,
  }

  availablePairs = []

  static get instance() {
    if (!instance) {
      instance = new GitPearModel()
    }
    return instance
  }

  constructor() {
    this.emitter = new Emitter()
  }

  restoreFromSavedState(savedPair) {
    Object.keys(savedPair).forEach(type => {
      if (savedPair[type]) {
        this.setPairRole(type, savedPair[type])
      }
    })
  }

  setPairRole(type, user) {
    const prefix = type === 'author' ? 'GIT_AUTHOR' : 'GIT_COMMITTER'
    if (user) {
      process.env[`${prefix}_NAME`] = user.name
      process.env[`${prefix}_EMAIL`] = user.email
    } else {
      delete process.env[`${prefix}_NAME`]
      delete process.env[`${prefix}_EMAIL`]
    }
    this.currentPair[type] = user || null
    this.didUpdate()
  }
<commit_msg>Atom seems to be overwriting our stuff<commit_after>'use babel'

import { Emitter } from 'atom'

let instance
export default class GitPearModel {
  currentPair = {
    author: null,
    committer: null,
  }

  availablePairs = []

  static get instance() {
    if (!instance) {
      instance = new GitPearModel()
    }
    return instance
  }

  constructor() {
    this.emitter = new Emitter()
  }

  restoreFromSavedState(savedPair) {
    setTimeout(() => {
      Object.keys(savedPair).forEach(type => {
        if (savedPair[type]) {
          this.setPairRole(type, savedPair[type])
        }
      })
    }, 2000)
  }

  setPairRole(type, user) {
    const prefix = type === 'author' ? 'GIT_AUTHOR' : 'GIT_COMMITTER'
    if (user) {
      process.env[`${prefix}_NAME`] = user.name
      process.env[`${prefix}_EMAIL`] = user.email
    } else {
      delete process.env[`${prefix}_NAME`]
      delete process.env[`${prefix}_EMAIL`]
    }
    this.currentPair[type] = user || null
    this.didUpdate()
  }

{'fraction_non_alphanumeric': 0.14197847257816504, 'fraction_numerical': 0.0020502306509482316, 'mean_word_length': 2.753846153846154, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2810058', 'n_tokens_mistral': 676, 'n_tokens_neox': 652, 'n_words': 130}