A branch of a Git repository as a store. It is written with Git's plumbing, so the working tree, the index and the branch a person has checked out are never touched, and it refuses a branch that is checked out in a working tree (a commit made under a person's feet would show there as the opposite change). A file is an object, its revision is sha256: and the digest of its bytes (so a revision means the same as in every other store, and Git's own names for the blob and the commit are given beside it), a write is guarded by the revision it expects and by the tip it was made on, a batch is one commit, a history is the commits that changed the file, and a branch that has no commit yet is made by the first write with no parent. It holds regular files: a link or another repository in the tree is refused when it is named and left out of a list; large files are refused at a limit and large file storage is not part of it.
typeCommitOptions= {
readonlyauthor:Identity;
/** Where it differs from the author. */readonlycommitter?:Identity;
/** The first line of the message, from what the commit changes. */readonlysubject?:Subject;
/** Lines after the message. */readonlytrailers?:readonlyTrailer[];
/** The clock that dates a commit, in milliseconds. */readonlyclock?: () =>number;
};
Who a commit is by and what it says: set by the program, never read from the configuration of a computer.
type GitRef = {
readonly store: GitRefStore;
readonly repo: string;
readonly branch: string;
/** The commit at t…(879 characters)
typeGitRef= {
readonlystore:GitRefStore;
readonlyrepo:string;
readonlybranch:string;
/** The commit at the tip of the branch, or nothing where there is none yet. */tip():Promise<Result<string|undefined, Problem>>;
/** The blob, mode and newest commit of a file. */info(path:Path):Promise<Result<ObjectInfo, Problem>>;
/** The commits that changed a file, newest first, with who made them. */log(path:Path, limit?:number):Promise<Result<readonlyLogEntry[], Problem>>;
/** Pushes this branch and nothing else to a remote; never forced, so a remote that has moved is refused. */push(remote:string):Promise<Result<Pushed, RemoteProblem>>;
/** Brings the branch up to a remote's where that is a fast-forward; a branch that has diverged is left as it is and said so. */fetch(remote:string):Promise<Result<Fetched, RemoteProblem>>;
};
type GitRefOptions = {
/** The repository: its working tree, its Git folder, or a bare repository; an absolute path. *…(875 characters)
typeGitRefOptions= {
/** The repository: its working tree, its Git folder, or a bare repository; an absolute path. */readonlyrepo:string;
readonlybranch:string;
/** The folder of the branch the store is of (the top of the branch where none). */readonlyprefix?:Prefix;
readonlycommit:CommitOptions;
/** The largest object, in bytes (50 MiB where none). */readonlymaxObjectBytes?:number;
/** Refuse a path another file system could not hold (the default). */readonlyportable?:boolean;
/** How many times to read a branch that moved and try again (8 where none). */readonlyattempts?:number;
/** Make a store of a branch that is checked out in a working tree: what a person sees there changes under them. */readonlyallowCheckedOut?:boolean;
/** The program that runs Git (`git` where none). */readonlyprogram?:string;
};
typeLogEntry= {
readonlycommit:string;
readonlyauthor: { readonlyname:string; readonlyemail:string };
/** When it was made (ISO 8601, UTC). */readonlyat:string;
readonlysubject:string;
/** The revision the file had after it, or nothing where it removed the file. */readonlyrev:Revision|undefined;
};
typeObjectInfo= {
readonlypath:Path;
/** The name of the blob in Git. */readonlyblob:string;
/** The mode of the file in Git: `100644` or `100755`. */readonlymode:string;
readonlysize:number;
readonlyrev:Revision;
/** The newest commit that changed the file. */readonlycommit:string;
};
What Git knows of a file beyond what a store says.