Commit Graph

19 Commits

Author SHA1 Message Date
Edward Thomson
6fd6c67824 Merge pull request #4030 from libgit2/ethomson/fsync
fsync all the things
2017-03-22 20:29:22 +00:00
Edward Thomson
1c04a96b25 Honor core.fsyncObjectFiles 2017-03-02 09:11:33 +00:00
Patrick Steinhardt
5aa1f12a81 tests: refs::create: fix memory leak 2017-03-01 07:45:14 +01:00
Edward Thomson
3ac05d1149 win32: don't fsync parent directories on Windows
Windows doesn't support it.
2017-02-28 13:29:01 +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
1229e1c4d7 fsync parent directories when fsyncing
When fsync'ing files, fsync the parent directory in the case where we
rename a file into place, or create a new file, to ensure that the
directory entry is flushed correctly.
2017-02-28 13:28:36 +00:00
Edward Thomson
eb56ed81af refdb_fs: optionally fsync packed refs 2017-02-28 13:28:36 +00:00
Edward Thomson
af3dcb0e50 refdb_fs: optionally fsync loose references 2017-02-28 13:28:36 +00:00
Richard Ipsum
b84e58f45d Whitespace and style fixes
Use C style comments as per style guide,
and fix mismatching indentation.
2017-02-25 14:18:16 +00:00
Richard Ipsum
d2b3a21f2b tests: Add create__symbolic_with_arbitrary_content
This test ensures that it's possible to create a symbolic ref that
has arbitrary data as its target. It also ensures it's possible
to obtain the target of that symbolic reference from the git_reference
object.
2017-02-25 14:18:16 +00:00
Edward Thomson
d22a8b9583 refs::create: strict object creation on by default
When we turned strict object creation validation on by default, we
forgot to inform the refs::create tests of this.  They, in fact,
believed that strict object creation was off by default.  As a result,
their cleanup function went and turned strict object creation off for
the remaining tests.
2016-04-11 11:50:11 -04:00
Carlos Martín Nieto
9b3fc895b7 tests: plug a leak 2016-03-03 11:17:36 +01:00
Edward Thomson
98c341496f refs: honor strict object creation 2016-02-28 18:54:39 -05:00
Edward Thomson
b46c7ee5e2 refs: complain when a directory exists at ref
When a (non-empty) directory exists at the reference target
location, complain with a more actionable error message.
2015-11-12 09:35:51 -05:00
Carlos Martín Nieto
659cf2029f Remove the signature from ref-modifying functions
The signature for the reflog is not something which changes
dynamically. Almost all uses will be NULL, since we want for the
repository's default identity to be used, making it noise.

In order to allow for changing the identity, we instead provide
git_repository_set_ident() and git_repository_ident() which allow a user
to override the choice of signature.
2015-03-03 14:40:50 +01:00
Edward Thomson
ee5da720e5 reference_create: validate loose names
Validate loose reference names on Win32.
2014-12-16 10:08:56 -06:00
Edward Thomson
0cee70ebb7 Introduce cl_assert_equal_oid 2014-07-01 14:40:16 -04:00
Carlos Martín Nieto
0b28217bda refs: remove the _with_log differentiation
Any well-behaved program should write a descriptive message to the
reflog whenever it updates a reference. Let's make this more prominent
by removing the version without the reflog parameters.
2014-01-15 13:32:43 +01:00
Ben Straub
1782038144 Rename tests-clar to tests 2013-11-14 14:05:52 -08:00