From e5ec440c982417d39908b9a4bab79523a6a37f6c Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Tue, 29 Mar 2022 21:41:52 +0000 Subject: [PATCH 1/2] core.fsync: fix incorrect expression for default configuration Commit b9f5d035 (core.fsync: documentation and user-friendly aggregate options, 2022-03-15) introduced an incorrect value for FSYNC_COMPONENTS_DEFAULT. We need an AND-NOT rather than OR-NOT. Signed-off-by: Neeraj Singh Signed-off-by: Junio C Hamano --- cache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cache.h b/cache.h index 86680f144e..e0b7415972 100644 --- a/cache.h +++ b/cache.h @@ -1013,8 +1013,8 @@ enum fsync_component { #define FSYNC_COMPONENTS_DERIVED_METADATA (FSYNC_COMPONENT_PACK_METADATA | \ FSYNC_COMPONENT_COMMIT_GRAPH) -#define FSYNC_COMPONENTS_DEFAULT (FSYNC_COMPONENTS_OBJECTS | \ - FSYNC_COMPONENTS_DERIVED_METADATA | \ +#define FSYNC_COMPONENTS_DEFAULT ((FSYNC_COMPONENTS_OBJECTS | \ + FSYNC_COMPONENTS_DERIVED_METADATA) & \ ~FSYNC_COMPONENT_LOOSE_OBJECT) #define FSYNC_COMPONENTS_COMMITTED (FSYNC_COMPONENTS_OBJECTS) From f12f3b9807accc0b4ae2b5ebde937fbbb6de7c99 Mon Sep 17 00:00:00 2001 From: Neeraj Singh Date: Wed, 30 Mar 2022 18:08:36 +0000 Subject: [PATCH 2/2] core.fsyncmethod: correctly camel-case warning message The warning for an unrecognized fsyncMethod was not camel-cased. Reported-by: Jiang Xin Signed-off-by: Neeraj Singh Signed-off-by: Junio C Hamano --- config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.c b/config.c index fd8e165931..b8497b9fa7 100644 --- a/config.c +++ b/config.c @@ -1694,7 +1694,7 @@ static int git_default_core_config(const char *var, const char *value, void *cb) if (!strcmp(var, "core.fsyncobjectfiles")) { if (fsync_object_files < 0) - warning(_("core.fsyncobjectfiles is deprecated; use core.fsync instead")); + warning(_("core.fsyncObjectFiles is deprecated; use core.fsync instead")); fsync_object_files = git_config_bool(var, value); return 0; }