Merge branch 'ps/fsync-refs'
Updates to refs traditionally weren't fsync'ed, but we can configure using core.fsync variable to do so. * ps/fsync-refs: core.fsync: new option to harden references
This commit is contained in:
7
cache.h
7
cache.h
@ -1005,6 +1005,7 @@ enum fsync_component {
|
||||
FSYNC_COMPONENT_PACK_METADATA = 1 << 2,
|
||||
FSYNC_COMPONENT_COMMIT_GRAPH = 1 << 3,
|
||||
FSYNC_COMPONENT_INDEX = 1 << 4,
|
||||
FSYNC_COMPONENT_REFERENCE = 1 << 5,
|
||||
};
|
||||
|
||||
#define FSYNC_COMPONENTS_OBJECTS (FSYNC_COMPONENT_LOOSE_OBJECT | \
|
||||
@ -1017,7 +1018,8 @@ enum fsync_component {
|
||||
FSYNC_COMPONENTS_DERIVED_METADATA | \
|
||||
~FSYNC_COMPONENT_LOOSE_OBJECT)
|
||||
|
||||
#define FSYNC_COMPONENTS_COMMITTED (FSYNC_COMPONENTS_OBJECTS)
|
||||
#define FSYNC_COMPONENTS_COMMITTED (FSYNC_COMPONENTS_OBJECTS | \
|
||||
FSYNC_COMPONENT_REFERENCE)
|
||||
|
||||
#define FSYNC_COMPONENTS_ADDED (FSYNC_COMPONENTS_COMMITTED | \
|
||||
FSYNC_COMPONENT_INDEX)
|
||||
@ -1026,7 +1028,8 @@ enum fsync_component {
|
||||
FSYNC_COMPONENT_PACK | \
|
||||
FSYNC_COMPONENT_PACK_METADATA | \
|
||||
FSYNC_COMPONENT_COMMIT_GRAPH | \
|
||||
FSYNC_COMPONENT_INDEX)
|
||||
FSYNC_COMPONENT_INDEX | \
|
||||
FSYNC_COMPONENT_REFERENCE)
|
||||
|
||||
/*
|
||||
* A bitmask indicating which components of the repo should be fsynced.
|
||||
|
Reference in New Issue
Block a user