Skip to content

Commit

Permalink
fix: stage files without glob pattern
Browse files Browse the repository at this point in the history
close #196
  • Loading branch information
Vinzent03 committed Mar 1, 2022
1 parent fe78ae3 commit 99b1f6c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/simpleGit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class SimpleGit extends GitManager {
}
this.plugin.setState(PluginState.add);

await this.git.add("./*", (err) => this.onError(err));
await this.git.add("-A", (err) => this.onError(err));

this.plugin.setState(PluginState.commit);

Expand All @@ -111,16 +111,14 @@ export class SimpleGit extends GitManager {
async stageAll(): Promise<void> {
this.plugin.setState(PluginState.add);
await this.git.add(
"./*", (err) => this.onError(err)
"-A", (err) => this.onError(err)
);
this.plugin.setState(PluginState.idle);
}

async unstageAll(): Promise<void> {
this.plugin.setState(PluginState.add);
await this.git.reset(
["--", "./*"], (err) => this.onError(err)
);
await this.git.reset([], (err) => this.onError(err));
this.plugin.setState(PluginState.idle);
}

Expand Down

0 comments on commit 99b1f6c

Please sign in to comment.