<commit_before>using System;
using System.Collections.Generic;

public static class GitWrapper {
  private static bool _isWorking = true;
  public static bool IsWorking { get { return _isWorking; } }

  public static string CurrentBranch {
    get {
      try {
        string rawName = ShellHelpers.OutputFromCommand("git", "symbolic-ref --quiet HEAD");
        return ShellHelpers.OutputFromCommand("git", "for-each-ref --format=\"%(refname:short)\" --sort=refname:short -- " + QuoteRef(rawName));
      } catch {
        _isWorking = false;
        return null;
      }
    }
  }

  public enum RefKind {
    Branch, TrackingBranch, Tag, Other
  }

  public struct Ref {
    // NOTE: shortName must be an UNAMBIGUOUS short name.
    public string fullName, shortName, id, upstream;
    private bool isInitialized;
    private RefKind _kind;
    public RefKind kind {
      get {
        if(!isInitialized) {
          isInitialized = true;<commit_msg>Guard code for external VCS not being enabled.<commit_after>using UnityEditor;
using System;
using System.Collections.Generic;

public static class GitWrapper {
  private static bool _isWorking = true;
  public static bool IsWorking { get { return _isWorking && (EditorSettings.externalVersionControl == ExternalVersionControl.Generic); } }

  public static string CurrentBranch {
    get {
      try {
        string rawName = ShellHelpers.OutputFromCommand("git", "symbolic-ref --quiet HEAD");
        return ShellHelpers.OutputFromCommand("git", "for-each-ref --format=\"%(refname:short)\" --sort=refname:short -- " + QuoteRef(rawName));
      } catch {
        _isWorking = false;
        return null;
      }
    }
  }

  public enum RefKind {
    Branch, TrackingBranch, Tag, Other
  }

  public struct Ref {
    // NOTE: shortName must be an UNAMBIGUOUS short name.
    public string fullName, shortName, id, upstream;
    private bool isInitialized;
    private RefKind _kind;
    public RefKind kind {
      get {
        if(!isInitialized) {
          isInitialized = true;
{'fraction_non_alphanumeric': 0.09720176730486009, 'fraction_numerical': 0.0, 'mean_word_length': 2.9419729206963248, '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': '1915698', 'n_tokens_mistral': 590, 'n_tokens_neox': 580, 'n_words': 170}