]> git.ipfire.org Git - thirdparty/git.git/blob - reftable/merged.h
Merge branch 'rs/use-xstrncmpz'
[thirdparty/git.git] / reftable / merged.h
1 /*
2 Copyright 2020 Google LLC
3
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file or at
6 https://developers.google.com/open-source/licenses/bsd
7 */
8
9 #ifndef MERGED_H
10 #define MERGED_H
11
12 #include "pq.h"
13
14 struct reftable_merged_table {
15 struct reftable_table *stack;
16 size_t stack_len;
17 uint32_t hash_id;
18
19 /* If unset, produce deletions. This is useful for compaction. For the
20 * full stack, deletions should be produced. */
21 int suppress_deletions;
22
23 uint64_t min;
24 uint64_t max;
25 };
26
27 struct merged_iter {
28 struct reftable_iterator *stack;
29 uint32_t hash_id;
30 size_t stack_len;
31 uint8_t typ;
32 int suppress_deletions;
33 struct merged_iter_pqueue pq;
34 struct strbuf key;
35 struct strbuf entry_key;
36 };
37
38 void merged_table_release(struct reftable_merged_table *mt);
39
40 #endif