mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
Merge commit 'refs/pull/78695/head' of github.com:microsoft/vscode into pr/78695
This commit is contained in:
@@ -1624,8 +1624,15 @@ export class Repository {
|
||||
.map(([ref]) => ({ name: ref, type: RefType.Head } as Branch));
|
||||
}
|
||||
|
||||
async getRefs(): Promise<Ref[]> {
|
||||
const result = await this.run(['for-each-ref', '--format', '%(refname) %(objectname)', '--sort', '-committerdate']);
|
||||
async getRefs(sortBranchListByCommitterDate?: Boolean): Promise<Ref[]> {
|
||||
const args = ['for-each-ref', '--format', '%(refname) %(objectname)'];
|
||||
|
||||
if (sortBranchListByCommitterDate) {
|
||||
args.push('--sort');
|
||||
args.push('-committerdate');
|
||||
}
|
||||
|
||||
const result = await this.run(args);
|
||||
|
||||
const fn = (line: string): Ref | null => {
|
||||
let match: RegExpExecArray | null;
|
||||
|
||||
Reference in New Issue
Block a user