File tree Expand file tree Collapse file tree 3 files changed +13
-13
lines changed Expand file tree Collapse file tree 3 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -852,7 +852,7 @@ export function addFileBrowserContextMenu(
852
852
const items = getSelectedBrowserItems ( ) ;
853
853
const statuses = new Set < Git . Status > (
854
854
items
855
- . map ( item => model . getFileStatus ( item . path ) )
855
+ . map ( item => model . getFile ( item . path ) ?. status )
856
856
. filter ( status => typeof status !== 'undefined' )
857
857
) ;
858
858
Original file line number Diff line number Diff line change @@ -242,10 +242,13 @@ export class GitExtension implements IGitExtension {
242
242
await this . refreshStatus ( ) ;
243
243
}
244
244
245
- getFileStatus ( path : string ) : Git . Status {
246
- return this . getFile ( path ) ?. status ;
247
- }
248
-
245
+ /**
246
+ * Match files status information based on a provided file path.
247
+ *
248
+ * If the file is tracked and has no changes, undefined will be returned
249
+ *
250
+ * @param path the file path relative to the server root
251
+ */
249
252
getFile ( path : string ) : Git . IStatusFile {
250
253
const matchingFiles = this . _status . files . filter ( status => {
251
254
return this . getRelativeFilePath ( status . to ) === path ;
Original file line number Diff line number Diff line change @@ -249,16 +249,13 @@ export interface IGitExtension extends IDisposable {
249
249
ensureGitignore ( ) : Promise < void > ;
250
250
251
251
/**
252
+ * Match files status information based on a provided file path.
252
253
*
253
- * @param path
254
- */
255
- getFile ( path : string ) : Git . IStatusFile ;
256
-
257
- /**
254
+ * If the file is tracked and has no changes, undefined will be returned
258
255
*
259
- * @param path
256
+ * @param path the file path relative to the server root
260
257
*/
261
- getFileStatus ( path : string ) : Git . Status ;
258
+ getFile ( path : string ) : Git . IStatusFile ;
262
259
263
260
/**
264
261
* Get current mark of file named fname
@@ -637,7 +634,7 @@ export namespace Git {
637
634
638
635
/** Interface for changed_files request result
639
636
* lists the names of files that have differences between two commits
640
- * or beween two branches, or that were changed by a single commit
637
+ * or between two branches, or that were changed by a single commit
641
638
*/
642
639
export interface IChangedFilesResult {
643
640
code : number ;
You can’t perform that action at this time.
0 commit comments