Staging
v0.5.1
swh:1:snp:c5feb7ee9221a3820c8879e85e8a18470c0b3afa
Raw File
Tip revision: 297ca895a27a6bbdb7906371d533f72a12ad25b2 authored by Junio C Hamano on 20 January 2022, 23:25:38 UTC
Merge branch 'js/branch-track-inherit'
Tip revision: 297ca89
merged.h
/*
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;
};

void merged_table_release(struct reftable_merged_table *mt);

#endif
back to top