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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/*
* Copyright (C) the libgit2 contributors. All rights reserved.
*
* This file is part of libgit2, distributed under the GNU GPL v2 with
* a Linking Exception. For full terms see the included COPYING file.
*/
/**
* @file git2/sys/midx.h
* @brief Incremental multi-pack indexes
* @defgroup git_midx Incremental multi-pack indexes
* @ingroup Git
* @{
*/
/**
* Options structure for `git_midx_writer_options`.
*
* Initialize with `GIT_MIDX_WRITER_OPTIONS_INIT`. Alternatively,
* you can use `git_midx_writer_options_init`.
*/
typedef struct git_midx_writer_options;
/** Current version for the `git_midx_writer_options` structure */
/** Static constructor for `git_midx_writer_options` */
/**
* Initialize git_midx_writer_options structure
*
* Initializes a `git_midx_writer_options` with default values.
* Equivalent to creating an instance with
* `GIT_MIDX_WRITER_OPTIONS_INIT`.
*
* @param opts The `git_midx_writer_options` struct to initialize.
* @param version The struct version; pass `GIT_MIDX_WRITER_OPTIONS_VERSION`.
* @return Zero on success; -1 on failure.
*/
;
/**
* Create a new writer for `multi-pack-index` files.
*
* @param out location to store the writer pointer.
* @param pack_dir the directory where the `.pack` and `.idx` files are. The
* `multi-pack-index` file will be written in this directory, too.
* @return 0 or an error code
*/
;
/**
* Free the multi-pack-index writer and its resources.
*
* @param w the writer to free. If NULL no action is taken.
*/
;
/**
* Add an `.idx` file to the writer.
*
* @param w the writer
* @param idx_path the path of an `.idx` file.
* @return 0 or an error code
*/
;
/**
* Write a `multi-pack-index` file to a file.
*
* @param w the writer
* @return 0 or an error code
*/
;
/**
* Dump the contents of the `multi-pack-index` to an in-memory buffer.
*
* @param midx Buffer where to store the contents of the `multi-pack-index`.
* @param w the writer
* @return 0 or an error code
*/
;
/** @} */