When multiple clients push to same remote repository, how does git deal with concurrency issues?

后端 未结 1 1500
感动是毒
感动是毒 2021-01-13 11:09

For each http request, a separate process git-http-backend runs on the server side.

When multiple clients push to same remote repository, what does it d

相关标签:
1条回答
  • 2021-01-13 11:19

    In the same manner as if invoked via SSH -- see the update_ref function in refs.c. The actual implementation of the locking mechanism lives in the lock_file function in lockfile.c, and yes, it creates a .lock file in there. Under the hood, it's done via the O_EXCL option to open().

    0 讨论(0)
提交回复
热议问题