Skip to content

Commit

Permalink
fix: properly check if path is being ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
mahyarmirrashed committed Jul 3, 2023
1 parent 9c82ab7 commit 576b6c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/gitService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class SimpleGitService implements GitService {
async isPathCurrentlyTracked(path: string): Promise<boolean> {
const status = await this.gitProvider.status();

return !status.not_added.includes(path);
return status.not_added.some((filePath) => filePath.startsWith(path));
}

async isPathPreviouslyTracked(path: string): Promise<boolean> {
Expand Down

0 comments on commit 576b6c4

Please sign in to comment.