Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a temp file + rename for atomic changes #38

Merged
merged 1 commit into from
Apr 20, 2018
Merged

Conversation

bpineau
Copy link
Owner

@bpineau bpineau commented Apr 20, 2018

We were updating the files in place. This left a small time frame
where files may be commited while in the middle of a write. The
final, complete file would then be commited soon after, but we
would end up with an ugly, partial commit in the history.

Using a temporary file then a rename ensure git only see complete
files (rename is atomic on POSIX filesystems).

We were updating the files in place. This left a small time frame
where files may be commited while in the middle of a write. The
final, complete file would then be commited soon after, but we
would end up with an ugly, partial commit in the history.

Using a temporary file then a rename ensure git only see complete
files (rename is atomic on POSIX filesystems).
@coveralls
Copy link

coveralls commented Apr 20, 2018

Coverage Status

Coverage decreased (-0.8%) to 91.069% when pulling 5f6a8a9 on atomic_changes into b59030b on master.

@bpineau bpineau merged commit 8276571 into master Apr 20, 2018
@bpineau bpineau deleted the atomic_changes branch April 20, 2018 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants