Welcome to mirror list, hosted at ThFree Co, Russian Federation.

merged.h « reftable - git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d5b39dfe7f1e3b54b5dc5e7ae46068155794986f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
Copyright 2020 Google LLC

Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file or at
https://developers.google.com/open-source/licenses/bsd
*/

#ifndef MERGED_H
#define MERGED_H

#include "pq.h"

struct reftable_merged_table {
	struct reftable_table *stack;
	size_t stack_len;
	uint32_t hash_id;

	/* If unset, produce deletions. This is useful for compaction. For the
	 * full stack, deletions should be produced. */
	int suppress_deletions;

	uint64_t min;
	uint64_t max;
};

struct merged_iter {
	struct reftable_iterator *stack;
	uint32_t hash_id;
	size_t stack_len;
	uint8_t typ;
	int suppress_deletions;
	struct merged_iter_pqueue pq;
	struct strbuf key;
	struct strbuf entry_key;
};

void merged_table_release(struct reftable_merged_table *mt);

#endif