Skip to content

Commit 7519c03

Browse files
committed
Renames to getStatusForPath for accuracy
1 parent 3a896ba commit 7519c03

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/env/node/git/sub-providers/status.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,13 +494,13 @@ export class StatusGitSubProvider implements GitStatusSubProvider {
494494
@gate()
495495
@log()
496496
async getStatusForFile(repoPath: string, pathOrUri: string | Uri): Promise<GitStatusFile | undefined> {
497-
const files = await this.getStatusForFiles(repoPath, pathOrUri);
497+
const files = await this.getStatusForPath(repoPath, pathOrUri);
498498
return files?.[0];
499499
}
500500

501501
@gate()
502502
@log()
503-
async getStatusForFiles(repoPath: string, pathOrGlob: string | Uri): Promise<GitStatusFile[] | undefined> {
503+
async getStatusForPath(repoPath: string, pathOrGlob: string | Uri): Promise<GitStatusFile[] | undefined> {
504504
const [relativePath] = splitPath(pathOrGlob, repoPath);
505505

506506
const porcelainVersion = (await this.git.isAtLeastVersion('2.11')) ? 2 : 1;

src/git/gitProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ export interface GitStashSubProvider {
559559
export interface GitStatusSubProvider {
560560
getStatus(repoPath: string | undefined): Promise<GitStatus | undefined>;
561561
getStatusForFile?(repoPath: string, uri: Uri): Promise<GitStatusFile | undefined>;
562-
getStatusForFiles?(repoPath: string, pathOrGlob: Uri): Promise<GitStatusFile[] | undefined>;
562+
getStatusForPath?(repoPath: string, pathOrGlob: Uri): Promise<GitStatusFile[] | undefined>;
563563

564564
getPausedOperationStatus?(repoPath: string): Promise<GitPausedOperationStatus | undefined>;
565565
abortPausedOperation?(repoPath: string, options?: { quit?: boolean }): Promise<void>;

src/views/nodes/fileHistoryNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class FileHistoryNode
6969
const [log, fileStatuses, currentUser, getBranchAndTagTips, unpublishedCommits] = await Promise.all([
7070
this.getLog(),
7171
this.uri.sha == null
72-
? this.view.container.git.status(this.uri.repoPath).getStatusForFiles?.(this.getPathOrGlob())
72+
? this.view.container.git.status(this.uri.repoPath).getStatusForPath?.(this.getPathOrGlob())
7373
: undefined,
7474
this.uri.sha == null ? this.view.container.git.config(this.uri.repoPath).getCurrentUser() : undefined,
7575
this.view.container.git.getBranchesAndTagsTipsLookup(this.uri.repoPath, this.branch?.name),

0 commit comments

Comments
 (0)