commit f44ffd20bad62e47d8f239070f4143fbfb01f914 from: Stefan Sperling date: Mon Feb 04 09:59:59 2019 UTC rename tree-specific fileindex diff callbacks commit - 289e3cbff4d223aea532dd36233301cfab1f7681 commit + f44ffd20bad62e47d8f239070f4143fbfb01f914 blob - 624ff8c5e397f086be39350ce231412e81309f9b blob + 752d2285ffeb5502e3de750d609292c97be7170d --- lib/fileindex.c +++ lib/fileindex.c @@ -564,13 +564,13 @@ walk_fileindex(struct got_fileindex *fileindex, struct static const struct got_error * diff_fileindex_tree(struct got_fileindex *, struct got_fileindex_entry **, struct got_tree_object *, const char *, struct got_repository *, - struct got_fileindex_diff_cb *, void *); + struct got_fileindex_diff_tree_cb *, void *); static const struct got_error * walk_tree(struct got_tree_entry **next, struct got_fileindex *fileindex, struct got_fileindex_entry **ie, struct got_tree_entry *te, const char *path, struct got_repository *repo, - struct got_fileindex_diff_cb *cb, void *cb_arg) + struct got_fileindex_diff_tree_cb *cb, void *cb_arg) { const struct got_error *err = NULL; @@ -623,7 +623,7 @@ static const struct got_error * diff_fileindex_tree(struct got_fileindex *fileindex, struct got_fileindex_entry **ie, struct got_tree_object *tree, const char *path, struct got_repository *repo, - struct got_fileindex_diff_cb *cb, void *cb_arg) + struct got_fileindex_diff_tree_cb *cb, void *cb_arg) { const struct got_error *err = NULL; struct got_tree_entry *te = NULL; @@ -683,7 +683,7 @@ diff_fileindex_tree(struct got_fileindex *fileindex, const struct got_error * got_fileindex_diff_tree(struct got_fileindex *fileindex, struct got_tree_object *tree, struct got_repository *repo, - struct got_fileindex_diff_cb *cb, void *cb_arg) + struct got_fileindex_diff_tree_cb *cb, void *cb_arg) { struct got_fileindex_entry *min; min = RB_MIN(got_fileindex_tree, &fileindex->entries); blob - dda31f77fa5248098bc71e1ddedd0c5fc717f4cf blob + 0336dd74296c652ed6ed0980e9a8ed007949c02d --- lib/got_lib_fileindex.h +++ lib/got_lib_fileindex.h @@ -114,18 +114,18 @@ typedef const struct got_error *(*got_fileindex_cb)(vo const struct got_error *got_fileindex_for_each_entry_safe( struct got_fileindex *, got_fileindex_cb cb, void *); -typedef const struct got_error *(*got_fileindex_diff_old_new_cb)(void *, +typedef const struct got_error *(*got_fileindex_diff_tree_old_new_cb)(void *, struct got_fileindex_entry *, struct got_tree_entry *, const char *); -typedef const struct got_error *(*got_fileindex_diff_old_cb)(void *, +typedef const struct got_error *(*got_fileindex_diff_tree_old_cb)(void *, struct got_fileindex_entry *, const char *); -typedef const struct got_error *(*got_fileindex_diff_new_cb)(void *, +typedef const struct got_error *(*got_fileindex_diff_tree_new_cb)(void *, struct got_tree_entry *, const char *); -struct got_fileindex_diff_cb { - got_fileindex_diff_old_new_cb diff_old_new; - got_fileindex_diff_old_cb diff_old; - got_fileindex_diff_new_cb diff_new; +struct got_fileindex_diff_tree_cb { + got_fileindex_diff_tree_old_new_cb diff_old_new; + got_fileindex_diff_tree_old_cb diff_old; + got_fileindex_diff_tree_new_cb diff_new; }; const struct got_error *got_fileindex_diff_tree(struct got_fileindex *, struct got_tree_object *, struct got_repository *, - struct got_fileindex_diff_cb *, void *); + struct got_fileindex_diff_tree_cb *, void *); blob - 15110d5d0b348b470e3fae465f56ac0a0b5848ad blob + 62fe586f6049080b787658189ede0445af34e6b9 --- lib/worktree.c +++ lib/worktree.c @@ -804,7 +804,7 @@ got_worktree_checkout_files(struct got_worktree *workt char *fileindex_path = NULL, *new_fileindex_path = NULL; struct got_fileindex *fileindex = NULL; FILE *index = NULL, *new_index = NULL; - struct got_fileindex_diff_cb diff_cb; + struct got_fileindex_diff_tree_cb diff_cb; struct diff_cb_arg arg; err = lock_worktree(worktree, LOCK_EX);