Commit Graph

6 Commits

Author SHA1 Message Date
Edward Thomson
1c04a96b25 Honor core.fsyncObjectFiles 2017-03-02 09:11:33 +00:00
Edward Thomson
2a5ad7d0f2 fsync: call it "synchronous" object writing
Rename `GIT_OPT_ENABLE_SYNCHRONIZED_OBJECT_CREATION` ->
`GIT_OPT_ENABLE_SYNCHRONOUS_OBJECT_CREATION`.
2017-02-28 13:29:01 +00:00
Edward Thomson
e6ed0d2f03 odb_loose: fsync tests
Introduce a simple counter that `p_fsync` implements.  This is useful
for ensuring that `p_fsync` is called when we expect it to be, for
example when we have enabled an odb backend to perform `fsync`s when
writing objects.
2017-02-28 13:27:49 +00:00
Russell Belfer
8949907887 Fix a number of git_odb_exists_prefix bugs
The git_odb_exists_prefix API was not dealing correctly when a
later backend returned GIT_ENOTFOUND even if an earlier backend
had found the object.

Additionally, the unit tests were not properly exercising the API
and had a couple mistakes in checking the results.

Lastly, since the backends are not expected to behavior correctly
unless all bytes of the short id are zero except for the prefix,
this makes the ODB prefix APIs explicitly clear out the extra
bytes so the user doesn't have to be as careful.
2014-03-10 11:34:50 -07:00
Russell Belfer
f5753999e4 Add exists_prefix to ODB backend and ODB API 2014-03-04 15:34:23 -08:00
Ben Straub
1782038144 Rename tests-clar to tests 2013-11-14 14:05:52 -08:00