libgit2 / pygit2

Python bindings for libgit2
https://www.pygit2.org/
Other
1.61k stars 385 forks source link

status: add untracked_files and ignored kwargs #1151

Closed dtrifiro closed 2 years ago

dtrifiro commented 2 years ago

add ignored and untracked_files kwargs to status.

untracked_files can take be one of "no", "normal", "all", which return respectively: no untracked files, untracked files/directories without recursing into subdirectories, all untracked files/directories. ignored can be True (show ignored files) or False (do not show ignored files). Whenuntracked_files="no", this does not have any effect.

For more information see --untracked-files and --ignored, see https://book.git-scm.com/docs/git-status

dtrifiro commented 2 years ago

Not sure why appveyor failed, one of the errors I'm getting:

failed on setup with "_pygit2.GitError: C:\Users\appveyor\AppData\Local\Temp\1\pytest-of-appveyor\pytest-> 0\test_reference_set_sha0\testrepo: repository path 'C:/Users/appveyor/AppData/Local/Temp/1/pytest-of-appveyor/pytest-0/test_reference_set_sha0/testrepo/' is not owned by current user"

As I'm not able to reproduce this locally, I could use some help there

skshetry commented 2 years ago

Not sure why appveyor failed, one of the errors I'm getting:

failed on setup with "_pygit2.GitError: C:\Users\appveyor\AppData\Local\Temp\1\pytest-of-appveyor\pytest-> 0\test_reference_set_sha0\testrepo: repository path 'C:/Users/appveyor/AppData/Local/Temp/1/pytest-of-appveyor/pytest-0/test_reference_set_sha0/testrepo/' is not owned by current user"

As I'm not able to reproduce this locally, I could use some help there

This is also failing on master: https://ci.appveyor.com/project/jdavid/pygit2/builds/44206064/job/83rhjdo521x5uk6e.

1150 seems to be the relevant PR where it's also failing, due to GIT_OPT_GET_OWNER_VALIDATION being enabled by default.

jdavid commented 2 years ago

This is also failing on master [...]

This is now fixed in master, you can rebase to get AppVeyor green.

dtrifiro commented 2 years ago

Thanks for the feedback! Updated everything as discussed

jdavid commented 2 years ago

Merged, thanks!