/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ export type GitLineChangeMarker = 'N' | 'M' | 'D' | '░'; export interface GitLineChangeResult { /** * 1-based line number in the *working tree* file -> marker. * * Only includes lines that have a non-default marker (N/M/D). Lines not present in the map * should be treated as unchanged. */ markersByLine: Map>; /** * 1-based line numbers after which there is a deletion block (relative to HEAD). * * Special case: 0 means "before the first line" (deletions at file start). */ deletionAfterLines: Set; /** * When present, indicates why git changes could not be computed. */ warning?: string; } /** * Computes per-line change markers for a file relative to HEAD. * * Notes: * - Uses `git diff HEAD --unified=0` to include both staged and unstaged changes. * - For files not in a git repo / git unavailable / errors: returns empty markers and a warning. */ export declare function getGitLineChanges(absolutePath: string): Promise;