Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git local concurrent access

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

like image 816
Manuel VACELET Avatar asked Aug 01 '12 09:08

Manuel VACELET


1 Answers

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.

like image 171
KingCrunch Avatar answered Sep 22 '22 05:09

KingCrunch