@@ -271,14 +271,24 @@ export class GitPanel extends React.Component<
271
271
) ;
272
272
}
273
273
274
- /** Commit all marked files */
274
+ /**
275
+ * Commits all marked files.
276
+ *
277
+ * @param message - commit message
278
+ * @returns a promise which commits the files
279
+ */
275
280
private _commitMarkedFiles = async ( message : string ) : Promise < void > => {
276
281
await this . props . model . reset ( ) ;
277
282
await this . props . model . add ( ...this . _markedFiles . map ( file => file . to ) ) ;
278
283
await this . _commitStagedFiles ( message ) ;
279
284
} ;
280
285
281
- /** Commit all staged files */
286
+ /**
287
+ * Commits all staged files.
288
+ *
289
+ * @param message - commit message
290
+ * @returns a promise which commits the files
291
+ */
282
292
private _commitStagedFiles = async ( message : string ) : Promise < void > => {
283
293
try {
284
294
if (
@@ -294,7 +304,10 @@ export class GitPanel extends React.Component<
294
304
}
295
305
} ;
296
306
297
- private get _modifiedFiles ( ) {
307
+ /**
308
+ * List of modified files (both staged and unstaged).
309
+ */
310
+ private get _modifiedFiles ( ) : Git . IStatusFileResult [ ] {
298
311
let files = this . state . untrackedFiles . concat (
299
312
this . state . unstagedFiles ,
300
313
this . state . stagedFiles
@@ -304,7 +317,10 @@ export class GitPanel extends React.Component<
304
317
return files ;
305
318
}
306
319
307
- private get _markedFiles ( ) {
320
+ /**
321
+ * List of marked files.
322
+ */
323
+ private get _markedFiles ( ) : Git . IStatusFileResult [ ] {
308
324
return this . _modifiedFiles . filter ( file =>
309
325
this . props . model . getMark ( file . to )
310
326
) ;
0 commit comments