git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
39583e5dbcd45fbcdea84dc186ef29c23679d6d2 blob 1823 bytes (raw)

 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
 
/*
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 READER_H
#define READER_H

#include "block.h"
#include "record.h"
#include "reftable-iterator.h"
#include "reftable-reader.h"

uint64_t block_source_size(struct reftable_block_source *source);

int block_source_read_block(struct reftable_block_source *source,
			    struct reftable_block *dest, uint64_t off,
			    uint32_t size);
void block_source_close(struct reftable_block_source *source);

/* metadata for a block type */
struct reftable_reader_offsets {
	int is_present;
	uint64_t offset;
	uint64_t index_offset;
};

/* The state for reading a reftable file. */
struct reftable_reader {
	/* for convience, associate a name with the instance. */
	char *name;
	struct reftable_block_source source;

	/* Size of the file, excluding the footer. */
	uint64_t size;

	/* 'sha1' for SHA1, 's256' for SHA-256 */
	uint32_t hash_id;

	uint32_t block_size;
	uint64_t min_update_index;
	uint64_t max_update_index;
	/* Length of the OID keys in the 'o' section */
	int object_id_len;
	int version;

	struct reftable_reader_offsets ref_offsets;
	struct reftable_reader_offsets obj_offsets;
	struct reftable_reader_offsets log_offsets;
};

int init_reader(struct reftable_reader *r, struct reftable_block_source *source,
		const char *name);
int reader_seek(struct reftable_reader *r, struct reftable_iterator *it,
		struct reftable_record *rec);
void reader_close(struct reftable_reader *r);
const char *reader_name(struct reftable_reader *r);

/* initialize a block reader to read from `r` */
int reader_init_block_reader(struct reftable_reader *r, struct block_reader *br,
			     uint64_t next_off, uint8_t want_typ);

#endif
debug log:

solving 39583e5dbcd ...
found 39583e5dbcd in https://public-inbox.org/git/a77878993aa02edc1582f0fb87ad1570aba1c12c.1630335476.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/22599d785b7a5893912ad1c4848e9ef44b6180dc.1629145036.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/fa9d3b95fd441bd9d190362e1d7c26d3ad7cbb0b.1626800687.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/patch-v4-13.28-7e8a613206f-20210823T120208Z-avarab@gmail.com/ ||
	https://public-inbox.org/git/f1fe338f67e875686333c7a3bfb6860ed7815f0b.1629207607.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/a43d35121640183c8f2669ce56fb46c108f2b565.1631213265.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/13de5d03a71c6ab8400989cd9c27398df8203f35.1632841817.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/8ba486f44a72fa2cb6d3617dfff4a3c2ec9c09a2.1618255553.git.gitgitgadget@gmail.com/ ||
	https://public-inbox.org/git/501cf0677ce47f5e0f2f5b5e32b84bd180f98002.1618832277.git.gitgitgadget@gmail.com/

applying [1/9] https://public-inbox.org/git/a77878993aa02edc1582f0fb87ad1570aba1c12c.1630335476.git.gitgitgadget@gmail.com/
diff --git a/reftable/reader.h b/reftable/reader.h
new file mode 100644
index 00000000000..39583e5dbcd

Checking patch reftable/reader.h...
Applied patch reftable/reader.h cleanly.

skipping https://public-inbox.org/git/22599d785b7a5893912ad1c4848e9ef44b6180dc.1629145036.git.gitgitgadget@gmail.com/ for 39583e5dbcd
skipping https://public-inbox.org/git/fa9d3b95fd441bd9d190362e1d7c26d3ad7cbb0b.1626800687.git.gitgitgadget@gmail.com/ for 39583e5dbcd
skipping https://public-inbox.org/git/patch-v4-13.28-7e8a613206f-20210823T120208Z-avarab@gmail.com/ for 39583e5dbcd
skipping https://public-inbox.org/git/f1fe338f67e875686333c7a3bfb6860ed7815f0b.1629207607.git.gitgitgadget@gmail.com/ for 39583e5dbcd
skipping https://public-inbox.org/git/a43d35121640183c8f2669ce56fb46c108f2b565.1631213265.git.gitgitgadget@gmail.com/ for 39583e5dbcd
skipping https://public-inbox.org/git/13de5d03a71c6ab8400989cd9c27398df8203f35.1632841817.git.gitgitgadget@gmail.com/ for 39583e5dbcd
skipping https://public-inbox.org/git/8ba486f44a72fa2cb6d3617dfff4a3c2ec9c09a2.1618255553.git.gitgitgadget@gmail.com/ for 39583e5dbcd
skipping https://public-inbox.org/git/501cf0677ce47f5e0f2f5b5e32b84bd180f98002.1618832277.git.gitgitgadget@gmail.com/ for 39583e5dbcd
index at:
100644 39583e5dbcd45fbcdea84dc186ef29c23679d6d2	reftable/reader.h

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).