I'm writing a piece of code that wrap access to a git repository (it performs write/add/commits and finally pushes)
This application does concurrent access to the git repository (it's a web app, several processes are running in parallel).
I wonder if I should add some kind of locking (ie. mutex) on git operations or if several processes doing git add/commit in parallel is a safe operation
If you are wrapping the official git-client (what you -- regarding your comment -- do), you can rely on it and don't need to implement it yourself (once more). It already takes care, that the writing actions appears atomic.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With