Skip to content

Commit 7bcfe60

Browse files
committed
Inline methods
1 parent 37448a0 commit 7bcfe60

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

src/components/GitPanel.tsx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -271,24 +271,10 @@ export class GitPanel extends React.Component<
271271
);
272272
}
273273

274-
/** Add an unstaged file */
275-
private _addFile = async (...file: string[]) => {
276-
await this.props.model.add(...file);
277-
};
278-
279-
private _addAllMarkedFiles = async () => {
280-
await this._addFile(...this._markedFiles.map(file => file.to));
281-
};
282-
283-
/** Reset all staged files */
284-
private _resetAllStagedFiles = async () => {
285-
await this.props.model.reset();
286-
};
287-
288274
/** Commit all marked files */
289275
private _commitAllMarkedFiles = async (message: string): Promise<void> => {
290-
await this._resetAllStagedFiles();
291-
await this._addAllMarkedFiles();
276+
await this.props.model.reset();
277+
await this.props.model.add(...this._markedFiles.map(file => file.to));
292278
await this._commitAllStagedFiles(message);
293279
};
294280

0 commit comments

Comments
 (0)