petersalomonsen / wasm-git

GIT for nodejs and the browser using https://libgit2.org compiled to WebAssembly with https://emscripten.org
Other
647 stars 37 forks source link

Add all files to staging #96

Closed rinkesh314e closed 6 months ago

rinkesh314e commented 6 months ago

Hi, I had a doubt on how could i simulate git add --all behaviour with this module. Git add with libgit2 does not suppport --all argument. Any suggestions on how i could do it?

petersalomonsen commented 6 months ago

See how it's solved in this project using wasm-git: https://github.com/arizas/Ariz-Portfolio/blob/main/public_html/storage/wasmgitworker.js#L121

It's using git status to find all the files that are updated/not tracked and then adds them.

rinkesh314e commented 6 months ago

Thanks for the quick reply. 👍