aboutsummaryrefslogtreecommitdiffstats
path: root/fmt-merge-msg.c
diff options
context:
space:
mode:
Diffstat (limited to 'fmt-merge-msg.c')
-rw-r--r--fmt-merge-msg.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/fmt-merge-msg.c b/fmt-merge-msg.c
index 501b5acdd4..c9085edc40 100644
--- a/fmt-merge-msg.c
+++ b/fmt-merge-msg.c
@@ -6,7 +6,7 @@
#include "environment.h"
#include "refs.h"
#include "object-name.h"
-#include "object-store.h"
+#include "odb.h"
#include "diff.h"
#include "diff-merges.h"
#include "hex.h"
@@ -26,13 +26,15 @@ static struct string_list suppress_dest_patterns = STRING_LIST_INIT_DUP;
int fmt_merge_msg_config(const char *key, const char *value,
const struct config_context *ctx, void *cb)
{
+ int *merge_log_config = cb;
+
if (!strcmp(key, "merge.log") || !strcmp(key, "merge.summary")) {
int is_bool;
- merge_log_config = git_config_bool_or_int(key, value, ctx->kvi, &is_bool);
- if (!is_bool && merge_log_config < 0)
+ *merge_log_config = git_config_bool_or_int(key, value, ctx->kvi, &is_bool);
+ if (!is_bool && *merge_log_config < 0)
return error("%s: negative length %s", key, value);
- if (is_bool && merge_log_config)
- merge_log_config = DEFAULT_MERGE_LOG_LEN;
+ if (is_bool && *merge_log_config)
+ *merge_log_config = DEFAULT_MERGE_LOG_LEN;
} else if (!strcmp(key, "merge.branchdesc")) {
use_branch_desc = git_config_bool(key, value);
} else if (!strcmp(key, "merge.suppressdest")) {
@@ -526,8 +528,8 @@ static void fmt_merge_msg_sigs(struct strbuf *out)
struct object_id *oid = origins.items[i].util;
enum object_type type;
unsigned long size;
- char *buf = repo_read_object_file(the_repository, oid, &type,
- &size);
+ char *buf = odb_read_object(the_repository->objects, oid,
+ &type, &size);
char *origbuf = buf;
unsigned long len = size;
struct signature_check sigc = { NULL };