@@ -77,7 +77,7 @@ import type { LogScope } from '../../logger';
7777import { Logger } from '../../logger' ;
7878import { gate } from '../../system/decorators/gate' ;
7979import { debug , getLogScope , log } from '../../system/decorators/log' ;
80- import { filterMap , last , some } from '../../system/iterable' ;
80+ import { filterMap , first , last , some } from '../../system/iterable' ;
8181import { isAbsolute , isFolderGlob , maybeUri , normalizePath , relative } from '../../system/path' ;
8282import { getSettledValue } from '../../system/promise' ;
8383import type { CachedBlame , CachedLog } from '../../trackers/gitDocumentTracker' ;
@@ -1177,6 +1177,12 @@ export class GitHubGitProvider implements GitProvider, Disposable {
11771177 } ) ;
11781178 }
11791179
1180+ if ( options ?. ref === 'HEAD' ) {
1181+ options . ref = first ( log . commits . values ( ) ) ?. sha ;
1182+ } else if ( options ?. ref != null ) {
1183+ options . ref = undefined ;
1184+ }
1185+
11801186 return {
11811187 repoPath : repoPath ,
11821188 paging : {
@@ -1186,6 +1192,7 @@ export class GitHubGitProvider implements GitProvider, Disposable {
11861192 more : log . hasMore ,
11871193 } ,
11881194 rows : rows ,
1195+ sha : options ?. ref ,
11891196
11901197 more : async ( limit : number | { until : string } | undefined ) : Promise < GitGraph | undefined > => {
11911198 const moreLog = await log . more ?.( limit ) ;
0 commit comments