<commit_before>import { DiffSelection, DiffSelectionType } from './diff'

/**
 * The status entry code as reported by Git.
 */
export enum GitStatusEntry {
  Modified = 'M',
  Added = 'A',
  Deleted = 'D',
  Renamed = 'R',
  Copied = 'C',
  Unchanged = '.',
  Untracked = '?',
  Ignored = '!',
  UpdatedButUnmerged = 'U',
}

/** The enum representation of a Git file change in GitHub Desktop. */
export enum AppFileStatusKind {
  New = 'New',
  Modified = 'Modified',
  Deleted = 'Deleted',
  Copied = 'Copied',
  Renamed = 'Renamed',
  Conflicted = 'Conflicted',
}

/** The state of a GitHub Desktop-specific change containing additional metadata */
export type PlainFileStatus = {
  kind:
    | AppFileStatusKind.New
    | AppFileStatusKind.Modified
    | AppFileStatusKind.Deleted
}

export type CopiedOrRenamedFileStatus = {
  kind: AppFileStatusKind.Copied | AppFileStatusKind.Renamed
  oldPath: string
}

/**
 * Details about a file marked as conflicted in the index which may have
 * conflict markers to inspect.
 */
type ConflictsWithMarkers = {
  kind: AppFileStatusKind.Conflicted
  entry: TextConflictEntry
  lookForConflictMarkers: true
  conflictMarkerCount: number
}

/**
 * Details about a file marked as conflicted in the index which needs to be
 * resolved manually by the user.
 */
type ManualConflict = {
  kind: AppFileStatusKind.Conflicted
  entry: ManualConflictEntry
  lookForConflictMarkers: false
}

/** Union of potential conflict scenarios the application should handle */
export type ConflictedFileStatus = ConflictsWithMarkers | ManualConflict

export type AppFileStatus =
  | PlainFileStatus
  | CopiedOrRenamedFileStatus
  | ConflictedFileStatus
<commit_msg>writing some docs<commit_after>import { DiffSelection, DiffSelectionType } from './diff'

/**
 * The status entry code as reported by Git.
 */
export enum GitStatusEntry {
  Modified = 'M',
  Added = 'A',
  Deleted = 'D',
  Renamed = 'R',
  Copied = 'C',
  Unchanged = '.',
  Untracked = '?',
  Ignored = '!',
  UpdatedButUnmerged = 'U',
}

/** The enum representation of a Git file change in GitHub Desktop. */
export enum AppFileStatusKind {
  New = 'New',
  Modified = 'Modified',
  Deleted = 'Deleted',
  Copied = 'Copied',
  Renamed = 'Renamed',
  Conflicted = 'Conflicted',
}

/**
 * Normal changes to a repository detected by GitHub Desktop
 */
export type PlainFileStatus = {
  kind:
    | AppFileStatusKind.New
    | AppFileStatusKind.Modified
    | AppFileStatusKind.Deleted
}

/**
 * Copied or renamed files are change staged in the index that have a source
 * as well as a destination.
 *
 * The `oldPath` of a copied file also exists in the working directory, but the
 * `oldPath` of a renamed file will be missing from the working directory.
 */
export type CopiedOrRenamedFileStatus = {
  kind: AppFileStatusKind.Copied | AppFileStatusKind.Renamed
  oldPath: string
}

/**
 * Details about a file marked as conflicted in the index which may have
 * conflict markers to inspect.
 */
type ConflictsWithMarkers = {
  kind: AppFileStatusKind.Conflicted
  entry: TextConflictEntry
  lookForConflictMarkers: true
  conflictMarkerCount: number
}

/**
 * Details about a file marked as conflicted in the index which needs to be
 * resolved manually by the user.
 */
type ManualConflict = {
  kind: AppFileStatusKind.Conflicted
  entry: ManualConflictEntry
  lookForConflictMarkers: false
}

/** Union of potential conflict scenarios the application should handle */
export type ConflictedFileStatus = ConflictsWithMarkers | ManualConflict

/** The union of potential states associated with a file change in Desktop */
export type AppFileStatus =
  | PlainFileStatus
  | CopiedOrRenamedFileStatus
  | ConflictedFileStatus

{'fraction_non_alphanumeric': 0.08985741189131019, 'fraction_numerical': 0.0, 'mean_word_length': 4.010781671159029, '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': '480904', 'n_tokens_mistral': 1132, 'n_tokens_neox': 1070, 'n_words': 370}