git-bundle-server icon indicating copy to clipboard operation
git-bundle-server copied to clipboard

Perform atomic writes with `.lock` files

Open derrickstolee opened this issue 3 years ago • 0 comments

The git-bundle-web-server might be reading from a bundle list as it is being written by the git-bundle-server CLI. Avoid concurrency issues by using an equivalent to Git's .lock file mechanism:

  1. Write to <file>.lock.
  2. Rename <file>.lock to <file>.

derrickstolee avatar Sep 21 '22 13:09 derrickstolee