// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
 * Snapshot of an in-progress merge for the SCM panel. Surfaces
 * the three things the panel needs to reshape itself when the
 * working tree is mid-merge:
 *
 * 1. Whether `.git/MERGE_HEAD` exists at all (gates the
 *    `Merging <ref>` banner above the composer, the "Commit
 *    merge" / "Abort merge" buttons, and the suppression of
 *    the sync / update-from-main buttons).
 * 2. A human-readable name for the ref being merged in
 *    (`merging_ref`), so the panel can say `Merging origin/main`
 *    instead of leaking a 40-char SHA.
 * 3. The path list of unmerged entries — `git ls-files
 *    --unmerged` collapsed by path. Drives the "N files still
 *    have unresolved conflicts" hint and gates the commit
 *    button: as long as `unmerged_paths` is non-empty `git
 *    commit` would refuse, so the button does too.
 *
 * The default value (`in_progress: false`, everything else empty
 * / `None`) is what every non-merging state returns — including
 * "not a git repo" and "git isn't installed". The SCM panel
 * reads `in_progress` first; if it's `false` the other fields
 * are irrelevant.
 */
export type GitMergeState = { 
/**
 * `true` iff `.git/MERGE_HEAD` exists. The SCM panel uses
 * this as the master switch for "merge-in-progress mode"
 * (merge banner, reshaped commit row, abort affordance,
 * hidden sync buttons).
 */
inProgress: boolean, 
/**
 * Short, user-recognisable label of the ref being merged.
 * Resolved with `git name-rev --name-only` against
 * `MERGE_HEAD`'s SHA when possible, so a freshly-pulled
 * `origin/main` reads as `"origin/main"` rather than its
 * commit hash. Falls back to the short SHA when
 * `name-rev` can't disambiguate (rare). `None` when
 * `MERGE_HEAD` doesn't exist or can't be read.
 */
mergingRef: string | null, 
/**
 * Contents of `.git/MERGE_MSG` (git's default commit message
 * for the merge — `"Merge branch 'foo'"` and friends).
 * `None` when the file doesn't exist; the SCM panel uses
 * this to prefill the composer when the user enters
 * merge-in-progress mode with an empty draft, the same way
 * the amend toggle prefills from `HEAD`.
 */
defaultMessage: string | null, 
/**
 * Workspace-relative paths of files with unmerged index
 * entries (`git ls-files --unmerged`). One entry per path,
 * regardless of how many index stages the file has (a
 * regular `UU` conflict has three stages but is one path).
 * Empty during a merge means "every conflict has been
 * resolved; the user can commit"; non-empty blocks the
 * commit button and powers the "N unresolved" hint.
 */
unmergedPaths: Array<string>, };
