import type { NodeishFilesystem } from "@lix-js/fs";
export declare function dirname(path: string): string;
export declare function basename(path: string): string;
export declare function overrideWants(lines: string[], oids: string[]): string[];
export declare function addWantsCapabilities(lines: string[]): string[];
export declare function addNoProgress(lines: string[]): string[];
export declare function addBlobNoneFilter(lines: string[]): string[];
/**
 * Helper method taking lines about to be sent to git-upload-pack and replaceses the haves part with the overrides provided
 * NOTE: this method was used to fetch only a subset of oids by building by substracting the them from all oids from the repo
 *  now that we foud out about "allow-tip-sha1-in-want allow-reachable-sha1-in-want " capabilites we no longer use this
 * @param lines
 * @param oids
 * @returns
 */
export declare function overrideHaves(lines: string[], oids: string[]): string[];
/**
 * This helper function checks the git folder for the existance of a blob. May it be within a pack file or as loose object.
 * It returns true if the blob can be found and false if not.
 *
 * @param fs the filesystem that has access to the repository. MUST not be an intercepted filesystem since this would lead to recruision // TODO #1459 we may want to check this at runtime / compiletime
 * @param oid the hash of the content of a file or a file we want to check if it exists locally // TODO #1459 think about folders here
 * @param gitdir the dire to look for blobs in
 * @returns
 */
export declare function blobExistsLocaly({ fs, oid, gitdir, cache, }: {
    fs: NodeishFilesystem;
    oid: string;
    gitdir: string;
    cache: any;
}): Promise<any>;
/**
 * Takes a line and addes the line lenght as 4 digit fixed hex value at the beginning…
 *
 * @param line a line raw used in a git-upload-pack request like: "want d7e62aef79d771d1771cb44c9e01faa4b7a607fe multi_ack_detailed no-done side-band-64k ofs-delta agent=git/isomorphic-git@1.24.5 filter"
 * @returns the line enriched with the amount of characters hex encoded in the first 4 characters:
 * "want d7e62aef79d771d1771cb44c9e01faa4b7a607fe multi_ack_detailed no-done side-band-64k ofs-delta agent=git/isomorphic-git@1.24.5 filter\n"
 * becomes
 * "008cwant d7e62aef79d771d1771cb44c9e01faa4b7a607fe multi_ack_detailed no-done side-band-64k ofs-delta agent=git/isomorphic-git@1.24.5 filter\n"
 *
 * this is because the prefixed hex 008c -> dec 140 and the leght of the line is 136 + 4 length characters. The only line that doesn't take the
 * length characters into account is the flush line. this is signalled by 0000
 */
export declare function encodePackLine(line: string): string;
/***
 *
 * Takes the buffer from a git-upload-pack request and creates an array of line objects
 *
 * 008cwant d7e62aef79d771d1771cb44c9e01faa4b7a607fe multi_ack_detailed no-done side-band-64k ofs-delta agent=git/isomorphic-git@1.24.5 filter
 * 000ddeepen 1
 * 0015filter blob:none
 * 00000009done
 *
 * will result in:
 *
 * [
 *  "want d7e62aef79d771d1771cb44c9e01faa4b7a607fe multi_ack_detailed no-done side-band-64k ofs-delta agent=git/isomorphic-git@1.24.5 filter\n",
 *  "deepen 1\n",
 *  "", // empty string represents a flush
 *  "filter blob:none\n"
 *  "done\n"
 * ]
 */
export declare function decodeGitPackLines(concatenatedUint8Array: Uint8Array): string[];
//# sourceMappingURL=helpers.d.ts.map