@@ -157,7 +157,7 @@ export class CommitsGitSubProvider implements GitCommitsSubProvider {
157157 const [ relativePath , root ] = splitPath ( uri , repoPath ) ;
158158
159159 try {
160- const log = await this . getLogForFile ( root , relativePath , rev , { limit : 2 } ) ;
160+ const log = await this . getLogForPath ( root , relativePath , rev , { limit : 2 } ) ;
161161 if ( log == null ) return undefined ;
162162
163163 let commit ;
@@ -633,7 +633,7 @@ export class CommitsGitSubProvider implements GitCommitsSubProvider {
633633 }
634634
635635 @log ( )
636- async getLogForFile (
636+ async getLogForPath (
637637 repoPath : string | undefined ,
638638 pathOrUri : string | Uri ,
639639 rev ?: string | undefined ,
@@ -656,10 +656,10 @@ export class CommitsGitSubProvider implements GitCommitsSubProvider {
656656 const relativePath = this . provider . getRelativePath ( pathOrUri , repoPath ) ;
657657
658658 if ( repoPath != null && repoPath === relativePath ) {
659- throw new Error ( `File name cannot match the repository path; path=${ relativePath } ` ) ;
659+ throw new Error ( `Path cannot match the repository path; path=${ relativePath } ` ) ;
660660 }
661661
662- const opts : typeof options & Parameters < CommitsGitSubProvider [ 'getLogForFileCore ' ] > [ 6 ] = {
662+ const opts : typeof options & Parameters < CommitsGitSubProvider [ 'getLogForPathCore ' ] > [ 6 ] = {
663663 reverse : false ,
664664 ...options ,
665665 } ;
@@ -769,7 +769,7 @@ export class CommitsGitSubProvider implements GitCommitsSubProvider {
769769 count : commits . size ,
770770 commits : commits ,
771771 query : ( limit : number | undefined ) =>
772- this . getLogForFile ( repoPath , pathOrUri , rev , { ...optsCopy , limit : limit } ) ,
772+ this . getLogForPath ( repoPath , pathOrUri , rev , { ...optsCopy , limit : limit } ) ,
773773 } ;
774774
775775 return log ;
@@ -783,7 +783,7 @@ export class CommitsGitSubProvider implements GitCommitsSubProvider {
783783 doc . state ??= new GitDocumentState ( ) ;
784784 }
785785
786- const promise = this . getLogForFileCore ( repoPath , relativePath , rev , doc , key , scope , opts ) ;
786+ const promise = this . getLogForPathCore ( repoPath , relativePath , rev , doc , key , scope , opts ) ;
787787
788788 if ( useCache && doc . state != null ) {
789789 Logger . debug ( scope , `Cache add: '${ key } '` ) ;
@@ -797,7 +797,7 @@ export class CommitsGitSubProvider implements GitCommitsSubProvider {
797797 return promise ;
798798 }
799799
800- private async getLogForFileCore (
800+ private async getLogForPathCore (
801801 repoPath : string | undefined ,
802802 path : string ,
803803 rev : string | undefined ,
@@ -870,9 +870,9 @@ export class CommitsGitSubProvider implements GitCommitsSubProvider {
870870 if ( log != null ) {
871871 const opts = { ...options , range : range } ;
872872 log . query = ( limit : number | undefined ) =>
873- this . getLogForFile ( repoPath , path , rev , { ...opts , limit : limit } ) ;
873+ this . getLogForPath ( repoPath , path , rev , { ...opts , limit : limit } ) ;
874874 if ( log . hasMore ) {
875- log . more = this . getLogForFileMoreFn ( log , path , rev , opts ) ;
875+ log . more = this . getLogForPathMoreFn ( log , path , rev , opts ) ;
876876 }
877877 }
878878
@@ -896,7 +896,7 @@ export class CommitsGitSubProvider implements GitCommitsSubProvider {
896896 }
897897 }
898898
899- private getLogForFileMoreFn (
899+ private getLogForPathMoreFn (
900900 log : GitLog ,
901901 relativePath : string ,
902902 rev : string | undefined ,
@@ -931,7 +931,7 @@ export class CommitsGitSubProvider implements GitCommitsSubProvider {
931931 }
932932 }
933933 }
934- const moreLog = await this . getLogForFile (
934+ const moreLog = await this . getLogForPath (
935935 log . repoPath ,
936936 relativePath ,
937937 options . all ? undefined : moreUntil == null ? `${ sha } ^` : `${ moreUntil } ^..${ sha } ^` ,
@@ -955,7 +955,7 @@ export class CommitsGitSubProvider implements GitCommitsSubProvider {
955955 limit : moreUntil == null ? ( log . limit ?? 0 ) + moreLimit : undefined ,
956956 hasMore : moreUntil == null ? moreLog . hasMore : true ,
957957 query : ( limit : number | undefined ) =>
958- this . getLogForFile ( log . repoPath , relativePath , rev , { ...options , limit : limit } ) ,
958+ this . getLogForPath ( log . repoPath , relativePath , rev , { ...options , limit : limit } ) ,
959959 } ;
960960
961961 if ( options . renames ) {
@@ -967,18 +967,18 @@ export class CommitsGitSubProvider implements GitCommitsSubProvider {
967967 }
968968
969969 if ( mergedLog . hasMore ) {
970- mergedLog . more = this . getLogForFileMoreFn ( mergedLog , relativePath , rev , options ) ;
970+ mergedLog . more = this . getLogForPathMoreFn ( mergedLog , relativePath , rev , options ) ;
971971 }
972972
973973 return mergedLog ;
974974 } ;
975975 }
976976
977977 @log ( )
978- async getOldestUnpushedShaForFile ( repoPath : string , uri : Uri ) : Promise < string | undefined > {
979- const [ relativePath , root ] = splitPath ( uri , repoPath ) ;
978+ async getOldestUnpushedShaForPath ( repoPath : string , pathOrUri : string | Uri ) : Promise < string | undefined > {
979+ const relativePath = this . provider . getRelativePath ( pathOrUri , repoPath ) ;
980980
981- const data = await this . git . log__file ( root , relativePath , '@{u}..' , {
981+ const data = await this . git . log__file ( repoPath , relativePath , '@{u}..' , {
982982 argsOrFormat : [ '-z' , '--format=%H' ] ,
983983 fileMode : 'none' ,
984984 ordering : configuration . get ( 'advanced.commitOrdering' ) ,
0 commit comments