3 ms·
> Sometimes git pull fails halfway through because of network problems Separate the pull into "git fetch" into a shared bare git repository (if you care for ef
by onedognight 14y ago
> Sometimes git pull fails halfway through because of network problems
Separate the pull into "git fetch" into a shared bare git repository (if you care for efficiency) which is atomic and then a "git checkout" into a new directory using a single symlink(2) and rename(2) which is also atomic because rename is.
> Imagine you’re pulling from git and at the same time, the app decides to import a module that changed profoundly since its last deployment. A plain crash is the best case scenario here.
> On the other hand, deploying using self-contained native packages makes the update of an app a near-atomic,
You can't have your cake and eat it too. Native packages have the exact same race conditions as an (inplace) git update.
- hynek 14y agoYou make fair points here however I was arguing against the widespread “git pull” culture. It's clear that some of the points can be mitigated using more sophisticated git+fab magic. Nevertheless, the other points remain true and the combination of them all makes me believe that native packages are the better way.