# fetch: remove calls to fsync · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/627a292a1139c96f5de80084ab5ce8b852db5132)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 627a292a1139c96f5de80084ab5ce8b852db5132

Requested commit: 627a292a1139c96f5de80084ab5ce8b852db5132

Commit: 627a292a1139c96f5de80084ab5ce8b852db5132

Tree: 581042caea1a1957a8df5f2b85a8662b32c3cdaf

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
fetch: remove calls to fsync

fsync blocks until the contents have been actually written to disk,
which would be useful if we didn't want to report success until having
achieved durability. But the OS will ensure coherency; i.e. if one
process writes stuff without calling fsync, then another process reads
that stuff, the writes will be seen even if they didn't get flushed to
disk yet.

Since this code deals with ephemeral cache data, it's not worth trying
to achieve this kind of durability guarantee. This is consistent with
all the other tooling on the system.

Certainly, if we wanted to change our stance on this, it would not be
something that affects only the git fetching logic.

```

## Parents

- [1a15fbe9607c74096c875f6d871213c7d4db1483](https://git.cafe/gitcafe/zig/commit/1a15fbe9607c74096c875f6d871213c7d4db1483?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/627a292a1139c96f5de80084ab5ce8b852db5132?format=markdown)
