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

Add option to skip git status check when adding a file #993

Closed
moranCohen26 opened this issue Jan 11, 2024 · 3 comments
Closed

Add option to skip git status check when adding a file #993

moranCohen26 opened this issue Jan 11, 2024 · 3 comments

Comments

@moranCohen26
Copy link
Contributor

I noticed that in large repository Status() takes too long time (5 sec in my case). In scale this is something that would be nice to improve to get a better performance, more so if you already know that which files you modified and want to add to stage.
My suggestion is to add "skipStatus" option to AddWithOptions to gain a better performances.
I will apply only if Path option is given and All option is not given. Anyway from my tests there should be no impact if you are trying to add a non modified file, behavior will be the same like you are not using the "skipStatus" flag.

moranCohen26 added a commit to moranCohen26/go-git that referenced this issue Jan 11, 2024
…fic path to add.

This will skip the git status check which might takes long time in a large repositories. go-git#993
@moranCohen26
Copy link
Contributor Author

moranCohen26 commented Jan 11, 2024

@pjbgf Please see my PR as suggested solution for this

moranCohen26 added a commit to moranCohen26/go-git that referenced this issue Jan 11, 2024
@moranCohen26
Copy link
Contributor Author

moranCohen26 commented Jan 16, 2024

@pjbgf Will appreciate your response, if anything missing in my issue or PR please let me know 🙏

@pjbgf
Copy link
Member

pjbgf commented Jan 23, 2024

Closing as per #994.

@pjbgf pjbgf closed this as completed Jan 23, 2024
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

No branches or pull requests

2 participants