<commit_before>module.exports =
class Git

  statusFlags:
    index_new: 1 << 0
    index_modified: 1 << 1
    index_deleted: 1 << 2
    index_renamed: 1 << 3
    index_typechange: 1 << 4
    working_dir_new: 1 << 7
    working_dir_modified: 1 << 8
    working_dir_delete: 1 << 9
    working_dir_typechange: 1 << 10
    ignore: 1 << 14

  constructor: (path) ->
    @repo = new GitRepository(path)

  getPath: -> @repo.getPath()

  getWorkingDirectory: ->
    repoPath = @repo.getPath()
    if repoPath
      repoPath.substring(0, repoPath.length - 5)

  getHead: ->
    @repo.getHead() or ''

  getPathStatus: (path) ->
    pathStatus = @repo.getStatus(@relativize(path))

  isPathIgnored: (path) ->
    @repo.isIgnored(@relativize(path))<commit_msg>Use getPath() internally<commit_after>module.exports =
class Git

  statusFlags:
    index_new: 1 << 0
    index_modified: 1 << 1
    index_deleted: 1 << 2
    index_renamed: 1 << 3
    index_typechange: 1 << 4
    working_dir_new: 1 << 7
    working_dir_modified: 1 << 8
    working_dir_delete: 1 << 9
    working_dir_typechange: 1 << 10
    ignore: 1 << 14

  constructor: (path) ->
    @repo = new GitRepository(path)

  getPath: -> @repo.getPath()

  getWorkingDirectory: ->
    repoPath = @getPath()
    if repoPath
      repoPath.substring(0, repoPath.length - 5)

  getHead: ->
    @repo.getHead() or ''

  getPathStatus: (path) ->
    pathStatus = @repo.getStatus(@relativize(path))

  isPathIgnored: (path) ->
    @repo.isIgnored(@relativize(path))
{'fraction_non_alphanumeric': 0.133289124668435, 'fraction_numerical': 0.03183023872679045, 'mean_word_length': 3.03475935828877, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 15, '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': '3697631', 'n_tokens_mistral': 582, 'n_tokens_neox': 520, 'n_words': 119}