Git branches sorted by committerdate, latest first.

This commit is contained in:
Sindre Tellevik
2017-11-17 00:09:23 +01:00
parent 7f673ae5fd
commit 924b1002bb

View File

@@ -1059,7 +1059,7 @@ export class Repository {
}
async getRefs(): Promise<Ref[]> {
const result = await this.run(['for-each-ref', '--format', '%(refname) %(objectname)']);
const result = await this.run(['for-each-ref', '--format', '%(refname) %(objectname)', '--sort', '-committerdate']);
const fn = (line: string): Ref | null => {
let match: RegExpExecArray | null;