浏览代码

Adds hack to select head in virtual repos

main
Keith Daulton 2 年前
父节点
当前提交
b01c9cc36a
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. +8
    -1
      src/plus/github/githubGitProvider.ts

+ 8
- 1
src/plus/github/githubGitProvider.ts 查看文件

@ -77,7 +77,7 @@ import type { LogScope } from '../../logger';
import { Logger } from '../../logger';
import { gate } from '../../system/decorators/gate';
import { debug, getLogScope, log } from '../../system/decorators/log';
import { filterMap, last, some } from '../../system/iterable';
import { filterMap, first, last, some } from '../../system/iterable';
import { isAbsolute, isFolderGlob, maybeUri, normalizePath, relative } from '../../system/path';
import { getSettledValue } from '../../system/promise';
import type { CachedBlame, CachedLog } from '../../trackers/gitDocumentTracker';
@ -1177,6 +1177,12 @@ export class GitHubGitProvider implements GitProvider, Disposable {
});
}
if (options?.ref === 'HEAD') {
options.ref = first(log.commits.values())?.sha;
} else if (options?.ref != null) {
options.ref = undefined;
}
return {
repoPath: repoPath,
paging: {
@ -1186,6 +1192,7 @@ export class GitHubGitProvider implements GitProvider, Disposable {
more: log.hasMore,
},
rows: rows,
sha: options?.ref,
more: async (limit: number | { until: string } | undefined): Promise<GitGraph | undefined> => {
const moreLog = await log.more?.(limit);

正在加载...
取消
保存