rename got_commit_object_mini to got_mini_commit_object
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 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383
diff --git a/lib/commit_graph.c b/lib/commit_graph.c
index 08c1ddd..1356457 100644
--- a/lib/commit_graph.c
+++ b/lib/commit_graph.c
@@ -163,12 +163,12 @@ is_merge_point(struct got_commit_graph_node *node)
}
static const struct got_error *
-detect_changed_path(int *changed, struct got_commit_object_mini *commit,
+detect_changed_path(int *changed, struct got_mini_commit_object *commit,
struct got_object_id *commit_id, const char *path,
struct got_repository *repo)
{
const struct got_error *err = NULL;
- struct got_commit_object_mini *pcommit = NULL;
+ struct got_mini_commit_object *pcommit = NULL;
struct got_tree_object *tree = NULL, *ptree = NULL;
struct got_object_qid *pid;
@@ -275,7 +275,7 @@ close_branch(struct got_commit_graph *graph, struct got_object_id *commit_id)
static const struct got_error *
advance_branch(struct got_commit_graph *graph,
struct got_commit_graph_node *node,
- struct got_object_id *commit_id, struct got_commit_object_mini *commit,
+ struct got_object_id *commit_id, struct got_mini_commit_object *commit,
struct got_repository *repo)
{
const struct got_error *err;
@@ -382,7 +382,7 @@ free_node(struct got_commit_graph_node *node)
static const struct got_error *
add_node(struct got_commit_graph_node **new_node,
struct got_commit_graph *graph, struct got_object_id *commit_id,
- struct got_commit_object_mini *commit,
+ struct got_mini_commit_object *commit,
struct got_commit_graph_node *child_node, struct got_repository *repo)
{
const struct got_error *err = NULL;
@@ -456,7 +456,7 @@ got_commit_graph_open(struct got_commit_graph **graph,
int first_parent_traversal, struct got_repository *repo)
{
const struct got_error *err = NULL;
- struct got_commit_object_mini *commit;
+ struct got_mini_commit_object *commit;
*graph = NULL;
@@ -547,7 +547,7 @@ fetch_commits_from_open_branches(int *ncommits,
for (i = 0; i < arg.ntips; i++) {
struct got_object_id *commit_id;
struct got_commit_graph_node *child_node, *new_node;
- struct got_commit_object_mini *commit;
+ struct got_mini_commit_object *commit;
int changed;
commit_id = &graph->tips[i].id;
@@ -628,7 +628,7 @@ got_commit_graph_iter_start(struct got_commit_graph *graph,
{
const struct got_error *err = NULL;
struct got_commit_graph_node *start_node;
- struct got_commit_object_mini *commit;
+ struct got_mini_commit_object *commit;
int changed;
start_node = got_object_idset_get(graph->node_ids, id);
diff --git a/lib/got_lib_object.h b/lib/got_lib_object.h
index 5eccdfb..fe430ca 100644
--- a/lib/got_lib_object.h
+++ b/lib/got_lib_object.h
@@ -50,7 +50,7 @@ struct got_blob_object {
};
/* Small version of got_commit_object. Used by commit graph. */
-struct got_commit_object_mini {
+struct got_mini_commit_object {
struct got_object_id *tree_id;
unsigned int nparents;
struct got_object_id_queue parent_ids;
@@ -59,9 +59,9 @@ struct got_commit_object_mini {
};
const struct got_error *
-got_object_mini_commit_open(struct got_commit_object_mini **,
+got_object_mini_commit_open(struct got_mini_commit_object **,
struct got_repository *, struct got_object *);
-void got_object_mini_commit_close(struct got_commit_object_mini *);
+void got_object_mini_commit_close(struct got_mini_commit_object *);
const struct got_error *got_object_open_as_mini_commit(
- struct got_commit_object_mini **, struct got_repository *,
+ struct got_mini_commit_object **, struct got_repository *,
struct got_object_id *);
diff --git a/lib/got_lib_object_cache.h b/lib/got_lib_object_cache.h
index 424cbaa..f54f072 100644
--- a/lib/got_lib_object_cache.h
+++ b/lib/got_lib_object_cache.h
@@ -27,7 +27,7 @@ struct got_object_cache_entry {
struct got_object *obj;
struct got_tree_object *tree;
struct got_commit_object *commit;
- struct got_commit_object_mini *mini_commit;
+ struct got_mini_commit_object *mini_commit;
} data;
};
diff --git a/lib/got_lib_object_parse.h b/lib/got_lib_object_parse.h
index 99f5e6b..0be7fad 100644
--- a/lib/got_lib_object_parse.h
+++ b/lib/got_lib_object_parse.h
@@ -16,7 +16,7 @@
const struct got_error *got_object_qid_alloc_partial(struct got_object_qid **);
struct got_commit_object *got_object_commit_alloc_partial(void);
-struct got_commit_object_mini *got_object_mini_commit_alloc_partial(void);
+struct got_mini_commit_object *got_object_mini_commit_alloc_partial(void);
const struct got_error *got_object_commit_add_parent(struct got_commit_object *,
const char *);
struct got_tree_entry *got_alloc_tree_entry_partial(void);
@@ -28,7 +28,7 @@ const struct got_error *got_object_read_commit_privsep(
struct got_commit_object **, struct got_object *, int,
struct got_repository *);
const struct got_error *got_object_read_mini_commit_privsep(
- struct got_commit_object_mini **, struct got_object *, int,
+ struct got_mini_commit_object **, struct got_object *, int,
struct got_repository *);
const struct got_error *got_object_read_tree_privsep(struct got_tree_object **,
struct got_object *, int, struct got_repository *);
@@ -36,7 +36,7 @@ const struct got_error *got_object_read_tree_privsep(struct got_tree_object **,
const struct got_error *got_object_parse_commit(struct got_commit_object **,
char *, size_t);
const struct got_error *got_object_parse_mini_commit(
- struct got_commit_object_mini **, char *, size_t);
+ struct got_mini_commit_object **, char *, size_t);
const struct got_error *got_object_parse_tree(struct got_tree_object **,
uint8_t *, size_t);
const struct got_error *got_read_file_to_mem(uint8_t **, size_t *, FILE *);
@@ -52,6 +52,6 @@ const struct got_error *got_object_packed_read_privsep(struct got_object **,
const struct got_error *got_object_read_packed_commit_privsep(
struct got_commit_object **, struct got_object *, struct got_pack *);
const struct got_error *got_object_read_packed_mini_commit_privsep(
- struct got_commit_object_mini **, struct got_object *, struct got_pack *);
+ struct got_mini_commit_object **, struct got_object *, struct got_pack *);
const struct got_error *got_object_read_packed_tree_privsep(
struct got_tree_object **, struct got_object *, struct got_pack *);
diff --git a/lib/got_lib_privsep.h b/lib/got_lib_privsep.h
index e343c37..bd18a5b 100644
--- a/lib/got_lib_privsep.h
+++ b/lib/got_lib_privsep.h
@@ -213,11 +213,11 @@ const struct got_error *got_privsep_recv_obj(struct got_object **,
const struct got_error *got_privsep_send_commit(struct imsgbuf *,
struct got_commit_object *);
const struct got_error *got_privsep_send_mini_commit(struct imsgbuf *,
- struct got_commit_object_mini *);
+ struct got_mini_commit_object *);
const struct got_error *got_privsep_recv_commit(struct got_commit_object **,
struct imsgbuf *);
const struct got_error *got_privsep_recv_mini_commit(
- struct got_commit_object_mini **, struct imsgbuf *);
+ struct got_mini_commit_object **, struct imsgbuf *);
const struct got_error *got_privsep_recv_tree(struct got_tree_object **,
struct imsgbuf *);
const struct got_error *got_privsep_send_tree(struct imsgbuf *,
diff --git a/lib/got_lib_repository.h b/lib/got_lib_repository.h
index 3eb7a0d..5211dc1 100644
--- a/lib/got_lib_repository.h
+++ b/lib/got_lib_repository.h
@@ -54,8 +54,8 @@ const struct got_error*got_repo_cache_commit(struct got_repository *,
struct got_commit_object *got_repo_get_cached_commit(struct got_repository *,
struct got_object_id *);
const struct got_error*got_repo_cache_mini_commit(struct got_repository *,
- struct got_object_id *, struct got_commit_object_mini *);
-struct got_commit_object_mini *got_repo_get_cached_mini_commit(
+ struct got_object_id *, struct got_mini_commit_object *);
+struct got_mini_commit_object *got_repo_get_cached_mini_commit(
struct got_repository *, struct got_object_id *);
const struct got_error *got_repo_cache_packidx(struct got_repository *,
struct got_packidx *);
diff --git a/lib/object.c b/lib/object.c
index cdf4028..fff88ff 100644
--- a/lib/object.c
+++ b/lib/object.c
@@ -351,7 +351,7 @@ got_object_commit_open(struct got_commit_object **commit,
}
static const struct got_error *
-open_mini_commit(struct got_commit_object_mini **commit,
+open_mini_commit(struct got_mini_commit_object **commit,
struct got_repository *repo, struct got_object *obj, int check_cache)
{
const struct got_error *err = NULL;
@@ -398,7 +398,7 @@ open_mini_commit(struct got_commit_object_mini **commit,
}
const struct got_error *
-got_object_open_as_mini_commit(struct got_commit_object_mini **commit,
+got_object_open_as_mini_commit(struct got_mini_commit_object **commit,
struct got_repository *repo, struct got_object_id *id)
{
const struct got_error *err;
@@ -425,7 +425,7 @@ done:
}
const struct got_error *
-got_object_mini_commit_open(struct got_commit_object_mini **commit,
+got_object_mini_commit_open(struct got_mini_commit_object **commit,
struct got_repository *repo, struct got_object *obj)
{
return open_mini_commit(commit, repo, obj, 1);
@@ -1172,7 +1172,7 @@ request_commit(struct got_commit_object **commit, struct got_repository *repo,
}
static const struct got_error *
-request_mini_commit(struct got_commit_object_mini **commit,
+request_mini_commit(struct got_mini_commit_object **commit,
struct got_repository *repo, struct got_object *obj, int fd)
{
const struct got_error *err = NULL;
@@ -1201,7 +1201,7 @@ got_object_read_packed_commit_privsep(struct got_commit_object **commit,
}
const struct got_error *
-got_object_read_packed_mini_commit_privsep(struct got_commit_object_mini **commit,
+got_object_read_packed_mini_commit_privsep(struct got_mini_commit_object **commit,
struct got_object *obj, struct got_pack *pack)
{
const struct got_error *err = NULL;
@@ -1252,7 +1252,7 @@ got_object_read_commit_privsep(struct got_commit_object **commit,
}
const struct got_error *
-got_object_read_mini_commit_privsep(struct got_commit_object_mini **commit,
+got_object_read_mini_commit_privsep(struct got_mini_commit_object **commit,
struct got_object *obj, int obj_fd, struct got_repository *repo)
{
int imsg_fds[2];
diff --git a/lib/object_cache.c b/lib/object_cache.c
index 883a84a..6d49541 100644
--- a/lib/object_cache.c
+++ b/lib/object_cache.c
@@ -112,7 +112,7 @@ got_object_cache_add(struct got_object_cache *cache, struct got_object_id *id, v
ce->data.commit = (struct got_commit_object *)item;
break;
case GOT_OBJECT_CACHE_TYPE_MINI_COMMIT:
- ce->data.mini_commit = (struct got_commit_object_mini *)item;
+ ce->data.mini_commit = (struct got_mini_commit_object *)item;
break;
}
@@ -169,7 +169,7 @@ void check_refcount(struct got_object_id *id, void *data, void *arg)
struct got_object *obj;
struct got_tree_object *tree;
struct got_commit_object *commit;
- struct got_commit_object_mini *mini_commit;
+ struct got_mini_commit_object *mini_commit;
char *id_str;
if (got_object_id_str(&id_str, id) != NULL)
diff --git a/lib/object_parse.c b/lib/object_parse.c
index ce15a31..834b928 100644
--- a/lib/object_parse.c
+++ b/lib/object_parse.c
@@ -146,10 +146,10 @@ got_object_commit_alloc_partial(void)
return commit;
}
-struct got_commit_object_mini *
+struct got_mini_commit_object *
got_object_mini_commit_alloc_partial(void)
{
- struct got_commit_object_mini *commit;
+ struct got_mini_commit_object *commit;
commit = calloc(1, sizeof(*commit));
if (commit == NULL)
@@ -190,7 +190,7 @@ got_object_commit_add_parent(struct got_commit_object *commit,
}
const struct got_error *
-got_object_mini_commit_add_parent(struct got_commit_object_mini *commit,
+got_object_mini_commit_add_parent(struct got_mini_commit_object *commit,
const char *id_str)
{
const struct got_error *err = NULL;
@@ -310,7 +310,7 @@ got_object_commit_close(struct got_commit_object *commit)
}
void
-got_object_mini_commit_close(struct got_commit_object_mini *commit)
+got_object_mini_commit_close(struct got_mini_commit_object *commit)
{
struct got_object_qid *qid;
@@ -452,7 +452,7 @@ done:
}
const struct got_error *
-got_object_parse_mini_commit(struct got_commit_object_mini **commit, char *buf,
+got_object_parse_mini_commit(struct got_mini_commit_object **commit, char *buf,
size_t len)
{
const struct got_error *err = NULL;
diff --git a/lib/privsep.c b/lib/privsep.c
index e0d4a53..d5e0f72 100644
--- a/lib/privsep.c
+++ b/lib/privsep.c
@@ -488,7 +488,7 @@ done:
const struct got_error *
got_privsep_send_mini_commit(struct imsgbuf *ibuf,
- struct got_commit_object_mini *commit)
+ struct got_mini_commit_object *commit)
{
const struct got_error *err = NULL;
struct got_imsg_commit_object_mini icommit;
@@ -681,7 +681,7 @@ got_privsep_recv_commit(struct got_commit_object **commit, struct imsgbuf *ibuf)
}
const struct got_error *
-got_privsep_recv_mini_commit(struct got_commit_object_mini **commit,
+got_privsep_recv_mini_commit(struct got_mini_commit_object **commit,
struct imsgbuf *ibuf)
{
const struct got_error *err = NULL;
diff --git a/lib/repository.c b/lib/repository.c
index 751a7ce..968cec4 100644
--- a/lib/repository.c
+++ b/lib/repository.c
@@ -233,7 +233,7 @@ got_repo_get_cached_commit(struct got_repository *repo,
const struct got_error *
got_repo_cache_mini_commit(struct got_repository *repo,
- struct got_object_id *id, struct got_commit_object_mini *commit)
+ struct got_object_id *id, struct got_mini_commit_object *commit)
{
#ifndef GOT_NO_OBJ_CACHE
const struct got_error *err = NULL;
@@ -245,11 +245,11 @@ got_repo_cache_mini_commit(struct got_repository *repo,
return NULL;
}
-struct got_commit_object_mini *
+struct got_mini_commit_object *
got_repo_get_cached_mini_commit(struct got_repository *repo,
struct got_object_id *id)
{
- return (struct got_commit_object_mini *)got_object_cache_get(
+ return (struct got_mini_commit_object *)got_object_cache_get(
&repo->minicommitcache, id);
}
diff --git a/libexec/got-read-commit/got-read-commit.c b/libexec/got-read-commit/got-read-commit.c
index 49187ef..b662f7b 100644
--- a/libexec/got-read-commit/got-read-commit.c
+++ b/libexec/got-read-commit/got-read-commit.c
@@ -80,7 +80,7 @@ read_commit_object(struct got_commit_object **commit, struct got_object *obj,
}
static const struct got_error *
-read_commit_object_mini(struct got_commit_object_mini **commit,
+read_commit_object_mini(struct got_mini_commit_object **commit,
struct got_object *obj, FILE *f)
{
const struct got_error *err;
@@ -177,7 +177,7 @@ main(int argc, char *argv[])
}
if (mini) {
- struct got_commit_object_mini *commit;
+ struct got_mini_commit_object *commit;
err = read_commit_object_mini(&commit, obj, f);
if (err)
goto done;
diff --git a/libexec/got-read-pack/got-read-pack.c b/libexec/got-read-pack/got-read-pack.c
index 1a4046e..f9e2970 100644
--- a/libexec/got-read-pack/got-read-pack.c
+++ b/libexec/got-read-pack/got-read-pack.c
@@ -151,7 +151,7 @@ mini_commit_request(struct imsg *imsg, struct imsgbuf *ibuf,
{
const struct got_error *err = NULL;
struct got_object *obj = NULL;
- struct got_commit_object_mini *commit = NULL;
+ struct got_mini_commit_object *commit = NULL;
uint8_t *buf;
size_t len;