git-tweezers
Version:
Advanced git staging tool with hunk and line-level control
23 lines (22 loc) • 834 B
TypeScript
import type { ParsedHunk } from './diff-parser.js';
/**
* Generate a stable content-based fingerprint for a hunk
* Based on O3's suggestion: uses content + context, excludes line numbers
*/
export declare function generateContentFingerprint(hunk: ParsedHunk, filePath: string): string;
/**
* Generate a stable ID for a hunk based on its content
* Uses content-based fingerprint to ensure stability across staging operations
*/
export declare function generateHunkId(hunk: ParsedHunk, filePath: string, existingIds?: Set<string>): string;
/**
* Extract a summary from hunk changes for better identification
*/
export declare function getHunkSummary(hunk: ParsedHunk): string;
/**
* Get change statistics for a hunk
*/
export declare function getHunkStats(hunk: ParsedHunk): {
additions: number;
deletions: number;
};