commit 05e1230b0e68bb81cdae380edccc969dd16215dc from: Stefan Sperling date: Mon Nov 05 11:42:03 2018 UTC rename got_commit_object_mini to got_mini_commit_object commit - e32baab7e125247f6fe514984040708eb0fc1d0c commit + 05e1230b0e68bb81cdae380edccc969dd16215dc blob - 08c1ddd1b73298b410791afccf5d5c931d412f72 blob + 1356457c06fba14aee526f0e6ab3bed70477ca5b --- lib/commit_graph.c +++ 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 go 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 *g { 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); blob - 5eccdfbebc694f89e02859e3abc9331c23fd1776 blob + fe430caa865a4a08c6b2f7aff78b39ec3b1ec79b --- lib/got_lib_object.h +++ 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 *); blob - 424cbaa1930612b2fe7b26bb46afd6575d3788f3 blob + f54f0728765dd02b604190b725d8df77b2ddf05e --- lib/got_lib_object_cache.h +++ 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; }; blob - 99f5e6bdf1e4f1b801b6f3c9b5241f99b89c4231 blob + 0be7fadfe9c2f58693e847bba52c229ef5fc6ca7 --- lib/got_lib_object_parse.h +++ 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(s 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 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 *); blob - e343c376c6a64789812c5c88e965304898f5d7d4 blob + bd18a5bd6340e39b7060420602783f883176a779 --- lib/got_lib_privsep.h +++ lib/got_lib_privsep.h @@ -213,11 +213,11 @@ const struct got_error *got_privsep_recv_obj(struct go 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 *, blob - 3eb7a0d15f87c4fbed21b13c884e3b13e83ed6be blob + 5211dc1d41de7829a31ea14bf405e30357303a79 --- lib/got_lib_repository.h +++ lib/got_lib_repository.h @@ -54,8 +54,8 @@ const struct got_error*got_repo_cache_commit(struct go 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 *); blob - cdf402815e07307ece15bae1ad771e079b6dd695 blob + fff88ff5430dd2dbee093f31aaf74496bb5e164f --- lib/object.c +++ lib/object.c @@ -351,7 +351,7 @@ got_object_commit_open(struct got_commit_object **comm } 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 **commi } 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, stru } 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_commi } 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_objec } 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]; blob - 883a84a15e357e4e6f3b5ba193c7c8fea843d4c1 blob + 6d49541d49c07af58c34459694fab0d5ba313cb4 --- lib/object_cache.c +++ lib/object_cache.c @@ -112,7 +112,7 @@ got_object_cache_add(struct got_object_cache *cache, s 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 *da 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) blob - ce15a31927ace3c21e8ca473c1e0718e612288a0 blob + 834b92887c6e497f05e11e3f5495591f7e7c0cf8 --- lib/object_parse.c +++ 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 } 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 *comm } 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; blob - e0d4a53bb329a1f39e987e8ef293e4e850ef4b36 blob + d5e0f72f96ef3ae2c31d5e9c9e24f74e106f881b --- lib/privsep.c +++ 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 **com } 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; blob - 751a7ce53f5493154336f1f3a6417d9afb42d2fe blob + 968cec4765ea692954e5f255042da6a876408e9b --- lib/repository.c +++ 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); } blob - 49187ef259affaaff4c947f46d12fb23afb35738 blob + b662f7b17edeb01dcdfee90cc68577e9eac499a8 --- libexec/got-read-commit/got-read-commit.c +++ libexec/got-read-commit/got-read-commit.c @@ -80,7 +80,7 @@ read_commit_object(struct got_commit_object **commit, } 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; blob - 1a4046e49b76e09595fd6cb02c2779592713c7c2 blob + f9e29703a891eb79b40e9960be5268d9fa038865 --- libexec/got-read-pack/got-read-pack.c +++ libexec/got-read-pack/got-read-pack.c @@ -151,7 +151,7 @@ mini_commit_request(struct imsg *imsg, struct imsgbuf { 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;