Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git status --ignored #718

Closed
ahmafi opened this issue Jan 18, 2022 · 1 comment · Fixed by #731
Closed

git status --ignored #718

ahmafi opened this issue Jan 18, 2022 · 1 comment · Fixed by #731

Comments

@ahmafi
Copy link

ahmafi commented Jan 18, 2022

Does this library support something like git.status(['--ignored'])?

In StatusResult I can only see these:

[
  'not_added', 'conflicted',
  'created',   'deleted',
  'modified',  'renamed',
  'files',     'staged',
  'ahead',     'behind',
  'current',   'tracking',
  'detached'
]
steveukx added a commit that referenced this issue Jan 23, 2022
- When `git.status` is called with the `--ignored` flag, the `StatusResult` response will include an extra `ignored: string[]` property of ignored paths.

Closes #718
@steveukx
Copy link
Owner

Hi, ignored files were being ignored entirely from the git.status call - I've now included them so when you have supplied --ignored to the git.status method, they will be listed in the returned StatusResult:

import simpleGit from 'simple-git';

simpleGit().status(['--ignored']).then(result => {
  console.log('ignored: ', result.ignored);
});

Please update to version 3.1.0 on npm now to have ignored files included in the response. If you have any problems upgrading to the new version, please do open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants