@struktoai/mirage-core
Version:
A Unified Virtual Filesystem For AI Agents
25 lines • 1.26 kB
TypeScript
import type { NOOPAccessor } from '../../../../accessor/base.ts';
import type { PathSpec } from '../../../../types.ts';
import type { CommandFnResult, Context } from '../../../config.ts';
import { type StagedEntry } from './index_file.ts';
/**
* An index entry putting a path back to what HEAD records.
*
* The stat fields are zeroed for the same reason staging zeroes them: a mount
* serves none of them meaningfully, and git reads a zeroed entry as one whose
* cache it should not trust rather than as a corrupt one. The size is zero
* because the blob was never read; every reader here takes that as "not stated".
*/
export declare function restored(oid: string, mode: number): StagedEntry;
/**
* Put the index back to what HEAD records, staging nothing.
*
* The working tree is never touched: this is `git reset` in its default mixed
* mode, which unstages. `--hard` is deliberately not offered, because it
* destroys uncommitted work and there is no reflog here to recover it from.
*
* A pathspec limits the reset to those paths, which is how a single file is
* unstaged.
*/
export declare function reset(_accessor: NOOPAccessor, paths: PathSpec[], texts: string[], ctx: Context): Promise<CommandFnResult>;
//# sourceMappingURL=reset.d.ts.map