Added revwalk

This commit is contained in:
Dolan
2017-06-06 16:57:30 +01:00
parent 046c22fa46
commit 7d863884d0
3 changed files with 38 additions and 0 deletions
+1
View File
@@ -33,6 +33,7 @@ export { Reference } from './reference';
export { RemoteCallbacks } from './remote-callbacks';
export { Remote } from './remote';
export { Repository } from './repository';
export { Revwalk } from './rev-walk';
export { Signature } from './signature';
export { Stash } from './stash';
export { StatusEntry } from './status-entry';
+36
View File
@@ -0,0 +1,36 @@
import { Repository } from './repository';
import { Oid } from './oid';
import { Commit } from './commit';
export namespace Revwalk {
enum SORT {
NONE = 0,
TOPOLOGICAL = 1,
TIME = 2,
REVERSE = 4
}
}
export class Revwalk {
static create(repo: Repository): Revwalk;
hide(commit_id: Oid): number;
hideGlob(glob: string): number;
hideHead(): number;
hideRef(refname: string): number;
next(): Promise<Oid>;
push(id: Oid): number;
pushGlob(glob: string): number;
pushHead(): number;
pushRange(range: string): number;
pushRef(refname: string): number;
repository(): Repository;
reset(): void;
simplifyFirstParent(): void;
sorting(sort: number): any;
fastWalk(max_count: number): Promise<any>;
fileHistoryWalk(filePath: string, max_count: number): Promise<any[]>;
walk(oid: Oid, callback: Function): Commit;
getCommitsUntil(checkFn: Function): Promise<any[]>;
getCommits(count: number): Promise<Commit[]>;
}
+1
View File
@@ -47,6 +47,7 @@
"remote-callbacks.d.ts",
"remote.d.ts",
"repository.d.ts",
"rev-walk.d.ts",
"signature.d.ts",
"stash.d.ts",
"status-entry.d.ts",